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 2372 - After a fullscreen toggle and returning to windowed mode, exiting causes a fullscreen close
Summary: After a fullscreen toggle and returning to windowed mode, exiting causes a fu...
Status: ASSIGNED
Alias: None
Product: SDL
Classification: Unclassified
Component: video (show other bugs)
Version: HG 2.1
Hardware: x86_64 Windows 7
: P2 normal
Assignee: Sam Lantinga
QA Contact: Sam Lantinga
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2014-01-28 21:58 UTC by ashton.lockey
Modified: 2017-08-14 21:02 UTC (History)
1 user (show)

See Also:


Attachments
Fullscreen Toggle Code (405 bytes, text/plain)
2014-01-28 21:58 UTC, ashton.lockey
Details

Note You need to log in before you can comment on or make changes to this bug.
Description ashton.lockey 2014-01-28 21:58:35 UTC
Created attachment 1542 [details]
Fullscreen Toggle Code

I noticed this when I implemented a fullscreen toggle to my game engine using the SDL_SetWindowFullscreen() function.

If you run SDL in windowed mode and exit the application everything goes fine, but if you toggle SDL_WINDOW_FULLSCREEN mode and then return to windowed mode and exit the application, the entire screen turns black as though it's exiting from a fullscreen context rather than a window before returning to the desktop.

The same thing happens even if you initialize the window as fullscreen then toggling back to window mode and exiting.

Additionally, if you exit while in fullscreen it seems to work fine but may be causing the same black screen resulting in the application taking longer to close but it's hard to tell.

This doesn't happen with SDL_WINDOW_FULLSCREEN_DESKTOP mode toggling.

-----

My OS is Windows 7 64bit and I am using an OpenGL 3.3 Core context.

Occurs in both the latest SDL 2.0.1 (stable) and Mercurial builds with Visual Studio 2012 express.

This also happens on both my NVIDIA Geforce 295 GTX and Geforce 780 TI graphics cards.

I've attached the code I use to perform the window / fullscreen toggle.
Comment 1 Alex Szpakowski 2014-01-29 05:02:24 UTC
This bug is specific to Windows I think - I can't reproduce it in OS X, but someone else in Windows is having the same problem: https://bitbucket.org/rude/love/issue/835/ (LÖVE uses SDL 2.)