mirror of
https://github.com/brl/mutter.git
synced 2024-11-22 08:00:42 -05:00
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:
parent
86c1c30245
commit
674bcef6da
@ -991,6 +991,9 @@ event_is_passive_button_grab (MetaDisplay *display,
|
|||||||
if (device_event->evtype != XI_ButtonPress)
|
if (device_event->evtype != XI_ButtonPress)
|
||||||
return FALSE;
|
return FALSE;
|
||||||
|
|
||||||
|
if (display->window_grab_modifiers == 0)
|
||||||
|
return FALSE;
|
||||||
|
|
||||||
if ((device_event->mods.effective & display->window_grab_modifiers) !=
|
if ((device_event->mods.effective & display->window_grab_modifiers) !=
|
||||||
display->window_grab_modifiers)
|
display->window_grab_modifiers)
|
||||||
return FALSE;
|
return FALSE;
|
||||||
|
@ -2108,7 +2108,7 @@ meta_display_handle_event (MetaDisplay *display,
|
|||||||
* care about. Just let the event through.
|
* care about. Just let the event through.
|
||||||
*/
|
*/
|
||||||
unmodified = (event->button.modifier_state & grab_mask) == 0;
|
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)
|
if (unmodified && window && window->have_focus_click_grab)
|
||||||
{
|
{
|
||||||
|
Loading…
Reference in New Issue
Block a user