summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorXan Lopez <xan@gnome.org>2009-02-25 17:38:53 +0000
committerXan Lopez <xan@src.gnome.org>2009-02-25 17:38:53 +0000
commit7871e095605332ce1cfb15e19a06f36b05604d0b (patch)
treeeec2735a4c72e5506a37c042316914d2ec814479
parent4708c01a2024957be57e4088d8d6afaac2d668c1 (diff)
downloadgdk-pixbuf-7871e095605332ce1cfb15e19a06f36b05604d0b.tar.gz
Bug 495320 - GtkRange does not use gdk_event_request_motions
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. svn path=/trunk/; revision=22407
-rw-r--r--ChangeLog9
-rw-r--r--gtk/gtkrange.c9
2 files changed, 13 insertions, 5 deletions
diff --git a/ChangeLog b/ChangeLog
index 7269be571..70539ba3b 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,12 @@
+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.
+
2009-02-24 Matthias Clasen <mclasen@redhat.com>
* gdk/x11/gdkevents-x11.c:
diff --git a/gtk/gtkrange.c b/gtk/gtkrange.c
index 6db35b5f1..0c1b313b5 100644
--- a/gtk/gtkrange.c
+++ b/gtk/gtkrange.c
@@ -2280,20 +2280,19 @@ gtk_range_motion_notify (GtkWidget *widget,
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;