When we're reparented we'll get both unmapnotify and mapnotify. Eat both so the unmap notify doesn't confuse the normal event processing.

This commit is contained in:
Sam Lantinga
2012-09-27 13:52:57 -07:00
parent 56b4c24c87
commit 6f3a45eb9c

View File

@@ -1065,6 +1065,7 @@ X11_BeginWindowFullscreenLegacy(_THIS, SDL_Window * window, SDL_VideoDisplay * _
XWarpPointer(display, None, root, 0, 0, 0, 0, rect.x, rect.y);
/* Wait to be mapped, filter Unmap event out if it arrives. */
XIfEvent(display, &ev, &isUnmapNotify, (XPointer)&data->xwindow);
XIfEvent(display, &ev, &isMapNotify, (XPointer)&data->xwindow);
/* Wait to be visible, or XSetInputFocus() triggers an X error. */