[mutter] window: Filter out buttons when checking if the event is unmodified
- From: Jasper St. Pierre <jstpierre src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [mutter] window: Filter out buttons when checking if the event is unmodified
- Date: Fri, 15 Aug 2014 12:41:43 +0000 (UTC)
commit a5f993f269f30dd555dfb04bec985a6643b43012
Author: Jasper St. Pierre <jstpierre mecheye net>
Date: Fri Aug 15 08:39:01 2014 -0400
window: Filter out buttons when checking if the event is unmodified
src/core/window.c | 6 +++++-
1 files changed, 5 insertions(+), 1 deletions(-)
---
diff --git a/src/core/window.c b/src/core/window.c
index 2fd48d2..92ea731 100644
--- a/src/core/window.c
+++ b/src/core/window.c
@@ -7912,7 +7912,11 @@ meta_window_handle_ungrabbed_event (MetaWindow *window,
* care about. Just let the event through.
*/
- unmodified = event->button.modifier_state == 0;
+ const int CLUTTER_BUTTON_MASK = (CLUTTER_BUTTON1_MASK | CLUTTER_BUTTON2_MASK |
+ CLUTTER_BUTTON3_MASK | CLUTTER_BUTTON4_MASK |
+ CLUTTER_BUTTON5_MASK);
+
+ unmodified = (event->button.modifier_state & ~CLUTTER_BUTTON_MASK) == 0;
is_window_grab = button_event_is_window_grab (display, event);
if (unmodified)
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]