| Summary: | SDL_WINDOW_FULLSCREEN_DESKTOP not always restored after focus loss | ||
|---|---|---|---|
| Product: | SDL | Reporter: | Daniel Scharrer <daniel> |
| Component: | video | Assignee: | Sam Lantinga <slouken> |
| Status: | RESOLVED ABANDONED | QA Contact: | Sam Lantinga <slouken> |
| Severity: | normal | ||
| Priority: | P2 | CC: | gabriel+bugzilla-libsdl, robert.perkel, x414e54 |
| Version: | 2.0.1 | Keywords: | target-2.0.6 |
| Hardware: | x86_64 | ||
| OS: | Linux | ||
| Attachments: |
xprop and xwininfo output for a "broken" window
Patch to fix restoring minimized SDL_WINDOW_FULLSCREEN_DESKTOP windows |
||
|
Description
Daniel Scharrer
2013-11-04 20:33:24 UTC
Created attachment 1407 [details]
Patch to fix restoring minimized SDL_WINDOW_FULLSCREEN_DESKTOP windows
I am also having a similar issue. There is a window which has been minimized and then the code is calling SDL_SetWindowFullscreen with SDL_WINDOW_FULLSCREEN_DESKTOP however the FULLSCREEN_VISIBLE macro seems to evaulate to false because the SDL_WINDOW_MINIMIZED bit is still set on the window. I tried adding in SDL_MaximizeWindow, SDL_ShowWindow and SDL_RestoreWindow but it still seems as though the SDL_WINDOW_MINIMIZED never gets unset. That bug occurs under Windows (only Windows 7 tested) with SDL_WINDOW_FULLSCREEN_DESKTOP, too. The attached patch by Daniel Scharrer does not resolve the issue for me. How to reproduce: 1. Create window with SDL_WINDOW_FULLSCREEN_DESKTOP state 2. Press Windows key, the SDL application is now gone and Desktop (or other programs) are visible. 3. Reopen the window via the Windows taskbar. The window is fullscreen but there is only in topleft corner a non-zoomed state rendered, the rest is of the window black (same as already stated "instead the window is restored at whatever its last non-fullscreen size was.") I can also concur. This is tested on Windows 8.1 - I noticed that after invalidation that the window bounds have been returned to their defaults. IE: The values passed in SDL_CreateWindow, and not those of the fullscreen window before (ex: 1920 x 1080 (fullscreen) to 700 x 700 (passed values). This may relate to another bug I noticed on one of programming projects that caused random partial invalidation of SDL_Renderer, where the Textures could not be drawn (but were "valid"), and the SDL_RenderDrawRects started to draw to much smaller sizes. I can attach the src for the game if it might be of assistance. We need to review this for 2.0.6 release. Thanks! I wasn't able to reproduce this with the latest SDL snapshot: http://www.libsdl.org/tmp/SDL-2.0.zip On Windows 8, I ran this command: testsprite --fullscreen-desktop --info all Then I pressed the Windows key, which minimized testsprite, then clicked on the task bar to restore it. Here was the output: INFO: Current renderer: INFO: Renderer direct3d: INFO: Flags: 0x0000000A (Accelerated | TargetTexturesSupported) INFO: Texture formats (3): ARGB8888, YV12, IYUV INFO: Max Texture Size: 16384x16384 INFO: SDL EVENT: Window 1 moved to 0,0 INFO: SDL EVENT: Window 1 changed size to 1920x1080 INFO: SDL EVENT: Window 1 resized to 1920x1080 INFO: SDL EVENT: Window 1 shown INFO: SDL EVENT: Window 1 gained keyboard focus INFO: SDL EVENT: Keyboard: text editing "" in window 1 INFO: SDL EVENT: Mouse entered window 1 INFO: SDL EVENT: Mouse left window 1 INFO: SDL EVENT: Mouse entered window 1 INFO: SDL EVENT: Window 1 exposed INFO: SDL EVENT: Keyboard: key pressed in window 1: scancode 0x000000E3 = Left Windows, keycode 0x400000E3 = Left Windows INFO: SDL EVENT: Keyboard: key released in window 1: scancode 0x000000E3 = Left Windows, keycode 0x400000E3 = Left Windows INFO: SDL EVENT: Window 1 moved to 640,300 INFO: SDL EVENT: Window 1 resized to 640x480 INFO: SDL EVENT: Window 1 changed size to 640x480 INFO: SDL EVENT: Window 1 minimized INFO: SDL EVENT: Window 1 lost keyboard focus INFO: SDL EVENT: Keyboard: text editing "" in window 1 INFO: SDL EVENT: Window 1 exposed INFO: SDL EVENT: Mouse left window 1 INFO: SDL EVENT: Window 1 moved to 0,0 INFO: SDL EVENT: Window 1 changed size to 1920x1080 INFO: SDL EVENT: Window 1 resized to 1920x1080 INFO: SDL EVENT: Window 1 restored INFO: SDL EVENT: Window 1 gained keyboard focus INFO: SDL EVENT: Mouse entered window 1 INFO: SDL EVENT: Mouse left window 1 INFO: SDL EVENT: Mouse entered window 1 INFO: SDL EVENT: Window 1 exposed INFO: SDL EVENT: render targets reset INFO: SDL EVENT: Keyboard: key pressed in window 1: scancode 0x00000029 = Escape, keycode 0x0000001B = Escape INFO: 93479.58 frames per second Can you see if this has been fixed for you in the latest snapshot? Thanks! Hello, and sorry if you're getting dozens of copies of this message by email. We are closing out bugs that appear to be abandoned in some form. This can happen for lots of reasons: we couldn't reproduce it, conversation faded out, the bug was noted as fixed in a comment but we forgot to mark it resolved, the report is good but the fix is impractical, we fixed it a long time ago without realizing there was an associated report, etc. Individually, any of these bugs might have a better resolution (such as WONTFIX or WORKSFORME or INVALID) but we've added a new resolution of ABANDONED to make this easily searchable and make it clear that it's not necessarily unreasonable to revive a given bug report. So if this bug is still a going concern and you feel it should still be open: please feel free to reopen it! But unless you respond, we'd like to consider these bugs closed, as many of them are several years old and overwhelming our ability to prioritize recent issues. (please note that hundred of bug reports were sorted through here, so we apologize for any human error. Just reopen the bug in that case!) Thanks, --ryan. |