mirror of
https://github.com/brl/mutter.git
synced 2024-12-24 12:02:04 +00:00
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:
parent
134ce072e7
commit
d842619755
@ -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;
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user