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.
This commit is contained in:
Matthias Clasen 2012-03-02 23:33:16 -05:00
parent ff37a04c96
commit 88ebe2285f

View File

@ -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;