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 <ebassi@linux.intel.com>
This commit is contained in:
Roland Peffer 2010-10-14 18:23:02 +01:00 committed by Emmanuele Bassi
parent 134ce072e7
commit d842619755

View File

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