gimp r27340 - in trunk: . app/widgets



Author: neo
Date: Mon Oct 20 13:31:59 2008
New Revision: 27340
URL: http://svn.gnome.org/viewvc/gimp?rev=27340&view=rev

Log:
2008-10-20  Sven Neumann  <sven gimp org>

	* app/widgets/gimpgradienteditor.c (view_events) 
(control_events):
	use pointer coordinates from the passed event instead of calling
	gtk_widget_get_pointer().



Modified:
   trunk/ChangeLog
   trunk/app/widgets/gimpgradienteditor.c

Modified: trunk/app/widgets/gimpgradienteditor.c
==============================================================================
--- trunk/app/widgets/gimpgradienteditor.c	(original)
+++ trunk/app/widgets/gimpgradienteditor.c	Mon Oct 20 13:31:59 2008
@@ -848,13 +848,10 @@
     case GDK_MOTION_NOTIFY:
       {
         GdkEventMotion *mevent = (GdkEventMotion *) event;
-        gint            x, y;
 
-        gtk_widget_get_pointer (widget, &x, &y);
-
-        if (x != editor->view_last_x)
+        if (mevent->x != editor->view_last_x)
           {
-            editor->view_last_x = x;
+            editor->view_last_x = mevent->x;
 
             if (editor->view_button_down)
               {
@@ -862,11 +859,11 @@
                                  (mevent->state & GDK_CONTROL_MASK) ?
                                  GIMP_COLOR_PICK_MODE_BACKGROUND :
                                  GIMP_COLOR_PICK_MODE_FOREGROUND,
-                                 x);
+                                 mevent->x);
               }
             else
               {
-                view_set_hint (editor, x);
+                view_set_hint (editor, mevent->x);
               }
           }
 
@@ -1190,26 +1187,23 @@
     case GDK_MOTION_NOTIFY:
       {
         GdkEventMotion *mevent = (GdkEventMotion *) event;
-        gint            x, y;
-
-        gtk_widget_get_pointer (editor->control, &x, &y);
 
-        if (x != editor->control_last_x)
+        if (mevent->x != editor->control_last_x)
           {
-            editor->control_last_x = x;
+            editor->control_last_x = mevent->x;
 
             if (GIMP_DATA_EDITOR (editor)->data_editable &&
                 editor->control_drag_mode != GRAD_DRAG_NONE)
               {
 
                 if ((mevent->time - editor->control_click_time) >= GRAD_MOVE_TIME)
-                  control_motion (editor, gradient, x);
+                  control_motion (editor, gradient, mevent->x);
               }
             else
               {
                 gimp_gradient_editor_update (editor);
 
-                control_do_hint (editor, x, y);
+                control_do_hint (editor, mevent->x, mevent->y);
               }
           }
 



[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]