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.
This commit is contained in:
Alexander Larsson
2009-01-26 20:50:56 +01:00
committed by Alexander Larsson
parent 016c5fd081
commit 5ca1865f5d

View File

@@ -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)