[gtk+] gdk: Emulate motion events when requested
- From: Matthias Clasen <matthiasc src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gtk+] gdk: Emulate motion events when requested
- Date: Sat, 3 Mar 2012 04:37:12 +0000 (UTC)
commit 88ebe2285fc159a9c7adeabcce294e2ed8d09b68
Author: Matthias Clasen <mclasen redhat com>
Date: Fri Mar 2 23:33:16 2012 -0500
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 files changed, 1 insertions(+), 1 deletions(-)
---
diff --git a/gdk/gdkwindow.c b/gdk/gdkwindow.c
index 3388752..9a053b8 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;
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]