When we're reparented we'll get both unmapnotify and mapnotify. Eat both so the unmap notify doesn't confuse the normal event processing.
authorSam Lantinga <slouken@libsdl.org>
Thu, 27 Sep 2012 13:52:57 -0700
changeset 6477 1e99ebaf0b14
parent 6476 9010d6830cdf
child 6478 89a570b56e47
When we're reparented we'll get both unmapnotify and mapnotify. Eat both so the unmap notify doesn't confuse the normal event processing.
src/video/x11/SDL_x11window.c
--- a/src/video/x11/SDL_x11window.c	Thu Sep 27 13:52:07 2012 -0700
+++ b/src/video/x11/SDL_x11window.c	Thu Sep 27 13:52:57 2012 -0700
@@ -1065,6 +1065,7 @@
     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. */