Handle mouse-button-modifier being disabled

In case 'mouse-button-modifier' is disabled the mask is 0 which means
we would always grab.
This commit is contained in:
Rui Matos 2014-02-28 14:51:52 +01:00
parent 86c1c30245
commit 674bcef6da
2 changed files with 4 additions and 1 deletions

View File

@ -991,6 +991,9 @@ event_is_passive_button_grab (MetaDisplay *display,
if (device_event->evtype != XI_ButtonPress)
return FALSE;
if (display->window_grab_modifiers == 0)
return FALSE;
if ((device_event->mods.effective & display->window_grab_modifiers) !=
display->window_grab_modifiers)
return FALSE;

View File

@ -2108,7 +2108,7 @@ meta_display_handle_event (MetaDisplay *display,
* care about. Just let the event through.
*/
unmodified = (event->button.modifier_state & grab_mask) == 0;
fully_modified = (event->button.modifier_state & grab_mask) == grab_mask;
fully_modified = grab_mask && (event->button.modifier_state & grab_mask) == grab_mask;
if (unmodified && window && window->have_focus_click_grab)
{