fepitre / rpms / gtk3

Forked from rpms/gtk3 4 years ago
Clone

Blame SOURCES/0001-x11-Handle-all-XI2-crossing-mode-values-in-switch.patch

8d4952
From 860d9870019ea49de1485940001a485953658145 Mon Sep 17 00:00:00 2001
8d4952
From: Carlos Garnacho <carlosg@gnome.org>
8d4952
Date: Wed, 4 Dec 2013 12:34:31 +0100
8d4952
Subject: [PATCH 1/2] x11: Handle all XI2 crossing mode values in switch
8d4952
8d4952
This fixes potential assertions if a GTK+ app gets to receive
8d4952
a XINotifyPassiveGrab/Ungrab pointer crossing event, currently
8d4952
triggerable by XIGrabEnter passive grabs.
8d4952
8d4952
http://bugzilla.gnome.org/show_bug.cgi?id=719762
8d4952
---
8d4952
 gdk/x11/gdkdevicemanager-xi2.c | 10 +++++++---
8d4952
 1 file changed, 7 insertions(+), 3 deletions(-)
8d4952
8d4952
diff --git a/gdk/x11/gdkdevicemanager-xi2.c b/gdk/x11/gdkdevicemanager-xi2.c
8d4952
index fa02b65..c0368bf 100644
8d4952
--- a/gdk/x11/gdkdevicemanager-xi2.c
8d4952
+++ b/gdk/x11/gdkdevicemanager-xi2.c
8d4952
@@ -780,12 +780,16 @@ translate_crossing_mode (gint mode)
8d4952
 {
8d4952
   switch (mode)
8d4952
     {
8d4952
-    case NotifyNormal:
8d4952
+    case XINotifyNormal:
8d4952
       return GDK_CROSSING_NORMAL;
8d4952
-    case NotifyGrab:
8d4952
+    case XINotifyGrab:
8d4952
+    case XINotifyPassiveGrab:
8d4952
       return GDK_CROSSING_GRAB;
8d4952
-    case NotifyUngrab:
8d4952
+    case XINotifyUngrab:
8d4952
+    case XINotifyPassiveUngrab:
8d4952
       return GDK_CROSSING_UNGRAB;
8d4952
+    case XINotifyWhileGrabbed:
8d4952
+      /* Fall through, unexpected in pointer crossing events */
8d4952
     default:
8d4952
       g_assert_not_reached ();
8d4952
     }
8d4952
-- 
8d4952
1.8.4.2
8d4952