Skip to content

Commit

Permalink
quartz: include all buttons' state in GdkEventMotion.state
Browse files Browse the repository at this point in the history
(cherry picked from commit 3b5c571)
  • Loading branch information
mitchfoo committed Nov 8, 2011
1 parent 5f6c70f commit 5ca2f06
Showing 1 changed file with 2 additions and 17 deletions.
19 changes: 2 additions & 17 deletions gdk/quartz/gdkevents-quartz.c
Original file line number Diff line number Diff line change
Expand Up @@ -848,22 +848,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);
Expand All @@ -872,7 +856,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;
}
Expand Down

0 comments on commit 5ca2f06

Please sign in to comment.