From 5ca1865f5d71f1983f6ed7ad51dde40e63784cd9 Mon Sep 17 00:00:00 2001 From: Alexander Larsson Date: Mon, 26 Jan 2009 20:50:56 +0100 Subject: [PATCH] Don't ignore native CROSSING_GRAB/UNGRAB events These are sent when someone else grabs the pointer, and we don't want to miss these expose events. For instance, we missed enter and leave events on alt-tab. There were some issues with these wrt out-of-sync grab information in the client, but that should now be handled. So, it should work or at least be fixable if we find some bug. --- gdk/gdkwindow.c | 26 -------------------------- 1 file changed, 26 deletions(-) diff --git a/gdk/gdkwindow.c b/gdk/gdkwindow.c index 6e96be9d36..2188c27dd4 100644 --- a/gdk/gdkwindow.c +++ b/gdk/gdkwindow.c @@ -8510,32 +8510,6 @@ _gdk_windowing_got_event (GdkDisplay *display, return; } - if ((event->type == GDK_ENTER_NOTIFY || - event->type == GDK_LEAVE_NOTIFY) && - (event->crossing.mode == GDK_CROSSING_GRAB || - event->crossing.mode == GDK_CROSSING_UNGRAB)) - { - /* We synthesize all crossing events due to grabs are synthesized, - * so we ignore the native ones. This is partly to get easier non-X - * portability, and because of problems with race conditions due to - * the cached state in the client and the real state in the xserver - * when grabbing. - */ - - /* We ended up in this window after some (perhaps other clients) - grab, so update the toplevel_under_window state */ - if (event->type == GDK_ENTER_NOTIFY && - event->crossing.mode == GDK_CROSSING_UNGRAB) - { - if (display->pointer_info.toplevel_under_pointer) - g_object_unref (display->pointer_info.toplevel_under_pointer); - display->pointer_info.toplevel_under_pointer = g_object_ref (event_window); - } - - unlink_event = TRUE; - goto out; - } - /* Store last pointer window and position/state */ if (event->type == GDK_ENTER_NOTIFY && event->crossing.detail != GDK_NOTIFY_INFERIOR)