Blame SOURCES/0001-events-Don-t-move-sloppy-focus-while-buttons-are-pre.patch

e3f29c
From 887537360c3c3b0ae5d0ef0222fad4d0a3bc41c9 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
e3f29c
Subject: [PATCH 5/8] events: Don't move (sloppy) focus while buttons are
e3f29c
 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
e3f29c
index 49f2569f3..ecb4de53d 100644
db633a
--- a/src/x11/events.c
db633a
+++ b/src/x11/events.c
db633a
@@ -830,6 +830,16 @@ crossing_serial_is_ignored (MetaDisplay  *display,
e3f29c
   return FALSE;
db633a
 }
db633a
 
e3f29c
+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
+
e3f29c
 static gboolean
db633a
 handle_input_xevent (MetaDisplay  *display,
db633a
                      XIEvent      *input_event,
e3f29c
@@ -871,6 +881,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
-- 
e3f29c
2.14.2
db633a