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