[gtk/wip/matthiasc/focus2: 1/50] x11: Don't emit GDK_NOTHING events



commit d8ffb3511d9510f86898dea4e776f2f5c7624ffe
Author: Matthias Clasen <mclasen redhat com>
Date:   Wed Mar 6 23:38:52 2019 -0500

    x11: Don't emit GDK_NOTHING events
    
    They are good for nothing.

 gdk/x11/gdkeventsource.c | 6 ++++++
 1 file changed, 6 insertions(+)
---
diff --git a/gdk/x11/gdkeventsource.c b/gdk/x11/gdkeventsource.c
index 5f85a0b7b0..25c68c3a3e 100644
--- a/gdk/x11/gdkeventsource.c
+++ b/gdk/x11/gdkeventsource.c
@@ -305,6 +305,12 @@ gdk_event_source_translate_event (GdkX11Display  *x11_display,
         }
     }
 
+  if (event &&
+      event->any.type == GDK_NOTHING)
+    {
+      g_clear_object (&event);
+    }
+
   if (event &&
       (event->any.type == GDK_ENTER_NOTIFY ||
        event->any.type == GDK_LEAVE_NOTIFY) &&


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]