From d8426197554f4745bc2489c81435b9510b62d21a Mon Sep 17 00:00:00 2001 From: Roland Peffer Date: Thu, 14 Oct 2010 18:23:02 +0100 Subject: [PATCH] osx: Add button mask to the modifier state translation The modifier state translation is missing the CLUTTER_BUTTON*_MASK. http://bugzilla.clutter-project.org/show_bug.cgi?id=2365 Signed-off-by: Emmanuele Bassi --- clutter/osx/clutter-event-osx.c | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/clutter/osx/clutter-event-osx.c b/clutter/osx/clutter-event-osx.c index ed5954295..1eb6f7207 100644 --- a/clutter/osx/clutter-event-osx.c +++ b/clutter/osx/clutter-event-osx.c @@ -74,8 +74,10 @@ static GPollFunc old_poll_func = NULL; - (gint)clutterModifierState { guint mods = [self modifierFlags]; + guint type = [self type]; gint rv = 0; + /* add key masks */ if (mods & NSAlphaShiftKeyMask) rv |= CLUTTER_LOCK_MASK; if (mods & NSShiftKeyMask) @@ -87,6 +89,12 @@ static GPollFunc old_poll_func = NULL; if (mods & NSCommandKeyMask) rv |= CLUTTER_MOD2_MASK; + /* add button mask */ + if ((type == NSLeftMouseDragged) || + (type == NSRightMouseDragged) || + (type == NSOtherMouseDragged)) + rv |= CLUTTER_BUTTON1_MASK << [self buttonNumber]; + return rv; }