From e8e6ae81893ac4a108f5a35ef87091317311e14f Mon Sep 17 00:00:00 2001 From: Rob Bradford Date: Sun, 4 Aug 2013 13:32:41 +0100 Subject: [PATCH] wayland: Only process the event if it's for a GdkWindow When we combine GTK with Clutter we will receive events for both surfaces that we have created as well as those created by Clutter. --- gdk/wayland/gdkdevice-wayland.c | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/gdk/wayland/gdkdevice-wayland.c b/gdk/wayland/gdkdevice-wayland.c index 225c12eac5..7624fa1b46 100644 --- a/gdk/wayland/gdkdevice-wayland.c +++ b/gdk/wayland/gdkdevice-wayland.c @@ -598,6 +598,8 @@ pointer_handle_enter (void *data, if (!surface) return; + if (!GDK_IS_WINDOW (wl_surface_get_user_data (surface))) + return; _gdk_wayland_display_update_serial (wayland_display, serial); @@ -641,6 +643,8 @@ pointer_handle_leave (void *data, if (!surface) return; + if (!GDK_IS_WINDOW (wl_surface_get_user_data (surface))) + return; _gdk_wayland_display_update_serial (wayland_display, serial); @@ -844,6 +848,8 @@ keyboard_handle_enter (void *data, if (!surface) return; + if (!GDK_IS_WINDOW (wl_surface_get_user_data (surface))) + return; _gdk_wayland_display_update_serial (wayland_display, serial); @@ -878,6 +884,8 @@ keyboard_handle_leave (void *data, if (!surface) return; + if (!GDK_IS_WINDOW (wl_surface_get_user_data (surface))) + return; _gdk_wayland_display_update_serial (wayland_display, serial);