From 88ebe2285fc159a9c7adeabcce294e2ed8d09b68 Mon Sep 17 00:00:00 2001 From: Matthias Clasen Date: Fri, 2 Mar 2012 23:33:16 -0500 Subject: [PATCH] gdk: Emulate motion events when requested GtkRange was using GDK_POINTER_MOTION_MASK, and it was not getting any emulated motion events, because we only translate from GDK_BUTTON_MOTION_MASK to GDK_POINTER_MOTION_MASK, but not the other way around, and emulated_mask only had GDK_BUTTON_MOTION_MASK in it. Now we put GDK_POINTER_MOTION_MASK in emulated_mask and successfully match for windows that have GDK_POINTER_MOTION_MASK or any of the button motion masks selected. This fixes range sliders not following the finger and jumping to the last position upon release. --- gdk/gdkwindow.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/gdk/gdkwindow.c b/gdk/gdkwindow.c index 33887526c6..9a053b88f0 100644 --- a/gdk/gdkwindow.c +++ b/gdk/gdkwindow.c @@ -9158,7 +9158,7 @@ get_event_window (GdkDisplay *display, emulated_mask |= GDK_BUTTON_PRESS_MASK; break; case GDK_TOUCH_UPDATE: - emulated_mask |= GDK_BUTTON_MOTION_MASK; + emulated_mask |= GDK_POINTER_MOTION_MASK; break; case GDK_TOUCH_END: emulated_mask |= GDK_BUTTON_RELEASE_MASK;