[mutter/wayland] Handle mouse-button-modifier being disabled
- From: Rui Matos <rtcm src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [mutter/wayland] Handle mouse-button-modifier being disabled
- Date: Fri, 28 Feb 2014 13:57:27 +0000 (UTC)
commit 674bcef6da7cd9882b7e1820e1edf35bd5d48da0
Author: Rui Matos <tiagomatos gmail com>
Date: Fri Feb 28 14:51:52 2014 +0100
Handle mouse-button-modifier being disabled
In case 'mouse-button-modifier' is disabled the mask is 0 which means
we would always grab.
src/compositor/compositor.c | 3 +++
src/core/display.c | 2 +-
2 files changed, 4 insertions(+), 1 deletions(-)
---
diff --git a/src/compositor/compositor.c b/src/compositor/compositor.c
index 52c0db8..4c6f0e2 100644
--- a/src/compositor/compositor.c
+++ b/src/compositor/compositor.c
@@ -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;
diff --git a/src/core/display.c b/src/core/display.c
index 7f59a84..acd26c6 100644
--- a/src/core/display.c
+++ b/src/core/display.c
@@ -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)
{
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]