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

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