gtk+ r22407 - in trunk: . gtk



Author: xan
Date: Wed Feb 25 17:38:53 2009
New Revision: 22407
URL: http://svn.gnome.org/viewvc/gtk+?rev=22407&view=rev

Log:
2009-02-25  Xan Lopez  <xan gnome org>

        Bug 495320 - GtkRange does not use gdk_event_request_motions

        * gtk/gtkrange.c:
        (gtk_range_motion_notify): Use gdk_event_request_motions to
        request more motion events, as suggested in the docs for widgets
        using motion hints.

Modified:
   trunk/ChangeLog
   trunk/gtk/gtkrange.c

Modified: trunk/gtk/gtkrange.c
==============================================================================
--- trunk/gtk/gtkrange.c	(original)
+++ trunk/gtk/gtkrange.c	Wed Feb 25 17:38:53 2009
@@ -2280,20 +2280,19 @@
 			 GdkEventMotion *event)
 {
   GtkRange *range;
-  gint x, y;
 
   range = GTK_RANGE (widget);
 
-  gdk_window_get_pointer (range->event_window, &x, &y, NULL);
+  gdk_event_request_motions (event);
   
-  range->layout->mouse_x = x;
-  range->layout->mouse_y = y;
+  range->layout->mouse_x = event->x;
+  range->layout->mouse_y = event->y;
 
   if (gtk_range_update_mouse_location (range))
     gtk_widget_queue_draw (widget);
 
   if (range->layout->grab_location == MOUSE_SLIDER)
-    update_slider_position (range, x, y);
+    update_slider_position (range, event->x, event->y);
 
   /* We handled the event if the mouse was in the range_rect */
   return range->layout->mouse_location != MOUSE_OUTSIDE;



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