[gtk+/gtk-2-24-quartz] quartz: include all buttons' state in GdkEventMotion.state
- From: John Ralls <jralls src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gtk+/gtk-2-24-quartz] quartz: include all buttons' state in GdkEventMotion.state
- Date: Wed, 23 Nov 2011 23:04:05 +0000 (UTC)
commit 8e28753d00cd7149b3504a96ae56b2543744dc6c
Author: Michael Natterer <mitch gimp org>
Date: Wed Nov 9 00:34:45 2011 +0100
quartz: include all buttons' state in GdkEventMotion.state
gdk/quartz/gdkevents-quartz.c | 19 ++-----------------
1 files changed, 2 insertions(+), 17 deletions(-)
---
diff --git a/gdk/quartz/gdkevents-quartz.c b/gdk/quartz/gdkevents-quartz.c
index 9188ae6..5bdab88 100644
--- a/gdk/quartz/gdkevents-quartz.c
+++ b/gdk/quartz/gdkevents-quartz.c
@@ -845,22 +845,6 @@ fill_motion_event (GdkWindow *window,
gint x_root,
gint y_root)
{
- GdkModifierType state;
-
- state = get_keyboard_modifiers_from_ns_event (nsevent);
-
- switch ([nsevent type])
- {
- case NSLeftMouseDragged:
- case NSRightMouseDragged:
- case NSOtherMouseDragged:
- state |= get_mouse_button_modifiers_from_ns_event (nsevent);
- break;
-
- case NSMouseMoved:
- break;
- }
-
event->any.type = GDK_MOTION_NOTIFY;
event->motion.window = window;
event->motion.time = get_time_from_ns_event (nsevent);
@@ -869,7 +853,8 @@ fill_motion_event (GdkWindow *window,
event->motion.x_root = x_root;
event->motion.y_root = y_root;
/* FIXME event->axes */
- event->motion.state = state;
+ event->motion.state = get_keyboard_modifiers_from_ns_event (nsevent) |
+ _gdk_quartz_events_get_current_mouse_modifiers ();
event->motion.is_hint = FALSE;
event->motion.device = _gdk_display->core_pointer;
}
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]