Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

SDL_ShowWindow() may end up a no-op #1720

Closed
SDLBugzilla opened this issue Feb 10, 2021 · 0 comments
Closed

SDL_ShowWindow() may end up a no-op #1720

SDLBugzilla opened this issue Feb 10, 2021 · 0 comments
Labels
duplicate This issue or pull request already exists

Comments

@SDLBugzilla
Copy link
Collaborator

This bug report was migrated from our old Bugzilla tracker.

These attachments are available in the static archive:

Reported in version: HG 2.1
Reported for operating system, platform: Linux, x86_64

Comments on the original bug report:

On 2014-12-12 09:31:56 +0000, Max Reitz wrote:

Created attachment 1969
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=, data1=0, data2=0) at /tmp/SDL-2.0.4-9267/src/events/SDL_windowevents.c:87

1 0x00007ffff39de4c6 in X11_DispatchMapNotify (data=) 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

On 2014-12-12 12:13:10 +0000, Max Reitz wrote:

Created attachment 1970
Fixed test case with SDL_Init() and SDL_Quit()

On 2014-12-12 12:15:20 +0000, Max Reitz wrote:

Created attachment 1971
Test case which should end up with the window being shown; now hopefully with correct SDL_Init() and SDL_Quit()

On 2017-11-14 14:46:15 +0000, Max Reitz wrote:

Hi,

Checking again, this issue seems to haven been fixed by revision 11151:7cfe088fafba.

Thanks!

Max

*** This bug has been marked as a duplicate of bug 3410 ***

@SDLBugzilla SDLBugzilla added bug duplicate This issue or pull request already exists labels Feb 10, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
duplicate This issue or pull request already exists
Projects
None yet
Development

No branches or pull requests

1 participant