Blame SOURCES/x11-Dont-call-XInput-API-for-core-events.patch

a41bf7
From 4b1c02560f0d8097bf5a11932e52fb72f3e9e94b Mon Sep 17 00:00:00 2001
a41bf7
From: Benjamin Otte <otte@redhat.com>
a41bf7
Date: Mon, 12 Feb 2018 21:09:50 +0100
a41bf7
Subject: [PATCH] x11: Don't call XInput API for core events
a41bf7
a41bf7
Fixes emacs crashing with XMing.
a41bf7
a41bf7
https://bugzilla.redhat.com/show_bug.cgi?id=1483942
a41bf7
---
a41bf7
 gdk/x11/gdkdisplay-x11.c | 10 ++++++++++
a41bf7
 1 file changed, 10 insertions(+)
a41bf7
a41bf7
diff --git a/gdk/x11/gdkdisplay-x11.c b/gdk/x11/gdkdisplay-x11.c
a41bf7
index 3e843d6..75bd34c 100644
a41bf7
--- a/gdk/x11/gdkdisplay-x11.c
a41bf7
+++ b/gdk/x11/gdkdisplay-x11.c
a41bf7
@@ -3072,6 +3072,16 @@ gdk_x11_display_get_default_seat (GdkDisplay *display)
a41bf7
 
a41bf7
   seats = gdk_display_list_seats (display);
a41bf7
 
a41bf7
+  /* Shortcut only one seat being available.
a41bf7
+   * This path always triggers for core events, so we can freely use XInput below. */
a41bf7
+  if (g_list_length (seats) == 1)
a41bf7
+    {
a41bf7
+      GdkSeat *seat = seats->data;
a41bf7
+
a41bf7
+      g_list_free (seats);
a41bf7
+      return seat;
a41bf7
+    }
a41bf7
+
a41bf7
   gdk_x11_display_error_trap_push (display);
a41bf7
   result = XIGetClientPointer (GDK_DISPLAY_XDISPLAY (display),
a41bf7
                                None, &device_id);
a41bf7
--
a41bf7
libgit2 0.26.0
a41bf7