Fixed error in one of the branches of the topmost algorithm.
[hildon] / hildon / hildon-color-chooser.c
index 81f8704..1dd0293 100644 (file)
@@ -625,7 +625,7 @@ inline_limited_expose                           (HildonColorChooser *sel)
 
     } else if(! priv->expose_info.expose_queued) {
         priv->expose_info.expose_queued = 1;
-        g_timeout_add ((EXPOSE_INTERVAL - result.tv_usec) / 1000, hildon_color_chooser_expose_timer, sel);
+        gdk_threads_add_timeout ((EXPOSE_INTERVAL - result.tv_usec) / 1000, hildon_color_chooser_expose_timer, sel);
     }
 }
 
@@ -705,8 +705,8 @@ hildon_color_chooser_pointer_motion             (GtkWidget *widget,
 
     g_assert (priv);
 
-    x = (gint) event->x;
-    y = (gint) event->y;
+    x = (int) event->x + widget->allocation.x;
+    y = (int) event->y + widget->allocation.y;
 
     if (priv->mousestate == 1) {
         if (x >= priv->spa.x && x <= priv->spa.x + priv->spa.width &&
@@ -1311,6 +1311,13 @@ hildon_color_chooser_get_color                  (HildonColorChooser *chooser,
         ((color->blue >> (16 - system_visual->blue_prec)) << system_visual->blue_shift);
 }
 
+/**
+ * hildon_color_chooser_new:
+ *
+ * Creates a new #HildonColorChooser.
+ *
+ * Returns: the new #HildonColorChooser
+ **/
 GtkWidget*
 hildon_color_chooser_new                        (void)
 {