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

776610
From fc8acff3338364e8ace9558924c762a7a59d8450 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
776610
index f60f650a6..291b7114a 100644
776610
--- a/src/x11/events.c
776610
+++ b/src/x11/events.c
776610
@@ -830,6 +830,16 @@ crossing_serial_is_ignored (MetaDisplay  *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
776610
 handle_input_xevent (MetaDisplay  *display,
776610
                      XIEvent      *input_event,
776610
@@ -871,6 +881,7 @@ handle_input_xevent (MetaDisplay  *display,
776610
        * avoid races.
776610
        */
776610
       if (window && !crossing_serial_is_ignored (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
-- 
776610
2.20.1
776610