# HG changeset patch # User Alex Smith # Date 1575301285 0 # Mon Dec 02 15:41:25 2019 +0000 # Node ID 2a2978aa031e259f447d8aac89b62b402dac38ef # Parent b393fb36e61ae0d554c619ea34cbe5f6b6a94ce4 Fix sending SDL_WINDOWEVENT_RESTORED after unminimizing windows on X11 SDL_SendWindowEvent will only send a RESTORED event if the window has the minimized or maximized flag set. However, for a SHOWN event, it will clear the minimized flag. Since the SHOWN event was being sent first for a MapNotify event, the RESTORED event would never be sent. Swapping the SendWindowEvent calls around fixes this. https://bugzilla.libsdl.org/show_bug.cgi?id=4821 diff -r b393fb36e61a -r 2a2978aa031e src/video/x11/SDL_x11events.c --- a/src/video/x11/SDL_x11events.c Thu Nov 28 14:23:24 2019 -0800 +++ b/src/video/x11/SDL_x11events.c Mon Dec 02 15:41:25 2019 +0000 @@ -433,8 +433,8 @@ static void X11_DispatchMapNotify(SDL_WindowData *data) { + SDL_SendWindowEvent(data->window, SDL_WINDOWEVENT_RESTORED, 0, 0); SDL_SendWindowEvent(data->window, SDL_WINDOWEVENT_SHOWN, 0, 0); - SDL_SendWindowEvent(data->window, SDL_WINDOWEVENT_RESTORED, 0, 0); } static void