We are currently migrating Bugzilla to GitHub issues.
Any changes made to the bug tracker now will be lost, so please do not post new bugs or make changes to them.
When we're done, all bug URLs will redirect to their equivalent location on the new bug tracker.

Bug 3215

Summary: Win32: 'fullscreen' app doesn't always extend to top of screen
Product: SDL Reporter: David Ludwig <dll>
Component: videoAssignee: David Ludwig <dll>
Status: RESOLVED FIXED QA Contact: David Ludwig <dll>
Severity: normal    
Priority: P2    
Version: HG 2.0   
Hardware: x86   
OS: Windows (All)   
Attachments: Screenshot of described, Observed Result
v.1 of fix, pending further testing

Description David Ludwig 2015-12-27 18:44:40 UTC
Via a specific combination of user-driven window-operations, an SDL app that should be fullscreen won't be, and will instead shows parts of the Windows desktop, or other apps, at the top of screen.

Steps to Reproduce:
1. launch an app that create a resize-able SDL_CreateWindow, by passing SDL_WINDOW_RESIZABLE to it
2. use standard Windows title-bar controls to maximize the app
3. use in-app means to make the app fullscreen, via a call to SDL_SetWindowFullscreen.
4. alt-tab out of the SDL app-in-question, to some other Windows app
5. alt-tab back into the SDL app-in-question

Observed Result:
The app's window is somewhat restored (it will not render, though, not without the proposed patch for Bug 3202), however the top of the screen will show through to either the Windows desktop, or to app(s) behind it.  Screenshots of this are forthcoming.

Expected Result:
The app is fully restored, and covers the entire screen.
Comment 1 David Ludwig 2015-12-27 19:29:59 UTC
Created attachment 2347 [details]
Screenshot of described, Observed Result

Here is the Observed Result, with a 'full-screened' SDL2 app at the bottom of the screen, but the app behind it is showing through!
Comment 2 David Ludwig 2015-12-27 19:32:31 UTC
A video of this bug being demonstrated is at https://www.youtube.com/watch?v=VM2yehBc76w

Please note that *BOTH* the screenshot and this video are performed with SDL Bug 3202's proposed patch being applied!  Without this patch, the bug still occurs, with app(s) behind the SDL app poking through, at the top of the screen, however the SDL content does not draw.
Comment 3 David Ludwig 2015-12-27 19:54:56 UTC
I just added some inline comments to that YouTube video of this bug, in-action.
Comment 4 David Ludwig 2015-12-28 05:09:23 UTC
Confirmed: this bug reproduces on Windows 7 SP1
Comment 5 David Ludwig 2015-12-28 05:10:35 UTC
It does look like the window isn't getting shrunk, to note, but rather that it is getting slid-down a bit, by roughly (exactly?) the amount of space that the title-bar takes up.
Comment 6 David Ludwig 2015-12-28 23:10:54 UTC
Created attachment 2350 [details]
v.1 of fix, pending further testing
Comment 7 David Ludwig 2015-12-30 18:49:06 UTC
Fixed via https://hg.libsdl.org/SDL/rev/c8fd9b498b67