Blame SOURCES/0001-events-Don-t-move-sloppy-focus-while-buttons-are-pre.patch
|
|
e47e58 |
From 887537360c3c3b0ae5d0ef0222fad4d0a3bc41c9 Mon Sep 17 00:00:00 2001
|
|
|
67f8b7 |
From: =?UTF-8?q?Florian=20M=C3=BCllner?= <fmuellner@gnome.org>
|
|
|
67f8b7 |
Date: Thu, 21 Jul 2016 15:43:12 +0200
|
|
|
e47e58 |
Subject: [PATCH 5/8] events: Don't move (sloppy) focus while buttons are
|
|
|
e47e58 |
pressed
|
|
|
67f8b7 |
|
|
|
67f8b7 |
(https://bugzilla.redhat.com/show_bug.cgi?id=1358535)
|
|
|
67f8b7 |
---
|
|
|
67f8b7 |
src/x11/events.c | 11 +++++++++++
|
|
|
67f8b7 |
1 file changed, 11 insertions(+)
|
|
|
67f8b7 |
|
|
|
67f8b7 |
diff --git a/src/x11/events.c b/src/x11/events.c
|
|
|
e47e58 |
index 49f2569f3..ecb4de53d 100644
|
|
|
67f8b7 |
--- a/src/x11/events.c
|
|
|
67f8b7 |
+++ b/src/x11/events.c
|
|
|
67f8b7 |
@@ -830,6 +830,16 @@ crossing_serial_is_ignored (MetaDisplay *display,
|
|
|
e47e58 |
return FALSE;
|
|
|
67f8b7 |
}
|
|
|
67f8b7 |
|
|
|
e47e58 |
+static gboolean
|
|
|
67f8b7 |
+event_has_button_mask (XIEnterEvent *enter_event)
|
|
|
67f8b7 |
+{
|
|
|
67f8b7 |
+ int i;
|
|
|
67f8b7 |
+ for (i = 0; i < enter_event->buttons.mask_len; i++)
|
|
|
67f8b7 |
+ if (enter_event->buttons.mask[i] != '\0')
|
|
|
67f8b7 |
+ return TRUE;
|
|
|
67f8b7 |
+ return FALSE;
|
|
|
67f8b7 |
+}
|
|
|
67f8b7 |
+
|
|
|
e47e58 |
static gboolean
|
|
|
67f8b7 |
handle_input_xevent (MetaDisplay *display,
|
|
|
67f8b7 |
XIEvent *input_event,
|
|
|
e47e58 |
@@ -871,6 +881,7 @@ handle_input_xevent (MetaDisplay *display,
|
|
|
67f8b7 |
* avoid races.
|
|
|
67f8b7 |
*/
|
|
|
67f8b7 |
if (window && !crossing_serial_is_ignored (display, serial) &&
|
|
|
67f8b7 |
+ !event_has_button_mask (enter_event) &&
|
|
|
67f8b7 |
enter_event->mode != XINotifyGrab &&
|
|
|
67f8b7 |
enter_event->mode != XINotifyUngrab &&
|
|
|
67f8b7 |
enter_event->detail != XINotifyInferior &&
|
|
|
67f8b7 |
--
|
|
|
e47e58 |
2.14.2
|
|
|
67f8b7 |
|