| Summary: | SDL_ShowWindow() may end up a no-op | ||
|---|---|---|---|
| Product: | SDL | Reporter: | Max Reitz <xanclic> |
| Component: | video | Assignee: | Ryan C. Gordon <icculus> |
| Status: | RESOLVED DUPLICATE | QA Contact: | Sam Lantinga <slouken> |
| Severity: | normal | ||
| Priority: | P2 | ||
| Version: | HG 2.1 | ||
| Hardware: | x86_64 | ||
| OS: | Linux | ||
| Attachments: |
Test case which should end up with the window being shown
Fixed test case with SDL_Init() and SDL_Quit() Test case which should end up with the window being shown; now hopefully with correct SDL_Init() and SDL_Quit() |
||
Created attachment 1970 [details]
Fixed test case with SDL_Init() and SDL_Quit()
Created attachment 1971 [details]
Test case which should end up with the window being shown; now hopefully with correct SDL_Init() and SDL_Quit()
|
Created attachment 1969 [details] Test case which should end up with the window being shown Using X under Fedora 20, the attached test case does not end up with the window shown. This seems to be the case because during the second SDL_PollEvent() loop, an X event is received by SDL which causes SDL to send an SDL_WINDOWEVENT_SHOWN (which somehow does not actually result in the window shown, however), and this then leads to SDL_ShowWindow() assuming that the window is already visible ("if (window->flags & SDL_WINDOW_SHOWN)"). This is a stack trace for the SDL-2.0.4-9267 tarball: #0 SDL_SendWindowEvent (window=0x555556738ff0, windowevent=<optimized out>, data1=0, data2=0) at /tmp/SDL-2.0.4-9267/src/events/SDL_windowevents.c:87 #1 0x00007ffff39de4c6 in X11_DispatchMapNotify (data=<optimized out>) at /tmp/SDL-2.0.4-9267/src/video/x11/SDL_x11events.c:381 #2 X11_DispatchEvent (_this=_this@entry=0x55555627e7f0) at /tmp/SDL-2.0.4-9267/src/video/x11/SDL_x11events.c:1099 #3 0x00007ffff39df3a8 in X11_PumpEvents (_this=0x55555627e7f0) at /tmp/SDL-2.0.4-9267/src/video/x11/SDL_x11events.c:1309 #4 0x00007ffff3952db9 in SDL_PumpEvents_REAL () at /tmp/SDL-2.0.4-9267/src/events/SDL_events.c:388 #5 SDL_WaitEventTimeout_REAL (timeout=0, event=0x7fffffffd6f0) at /tmp/SDL-2.0.4-9267/src/events/SDL_events.c:421 #6 SDL_PollEvent_REAL (event=0x7fffffffd6f0) at /tmp/SDL-2.0.4-9267/src/events/SDL_events.c:403