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

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