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 3717 - Fullscreen exits fullscreen when minimized or hidden
Summary: Fullscreen exits fullscreen when minimized or hidden
Status: ASSIGNED
Alias: None
Product: SDL
Classification: Unclassified
Component: video (show other bugs)
Version: 2.0.5
Hardware: x86_64 Linux
: P2 normal
Assignee: Sam Lantinga
QA Contact: Sam Lantinga
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2017-07-28 14:51 UTC by James Legg
Modified: 2017-08-15 07:18 UTC (History)
1 user (show)

See Also:


Attachments
Program illustrating issue (1.13 KB, text/plain)
2017-07-28 14:51 UTC, James Legg
Details
Patch removing the fullscreen changes (1.10 KB, patch)
2017-07-28 14:57 UTC, James Legg
Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description James Legg 2017-07-28 14:51:38 UTC
Created attachment 2809 [details]
Program illustrating issue

When a fullscreen window is minimized (which happens by default when it looses focus) or hidden, the fullscreen state is removed, and the window resized to its previous size (either the size it was before entering fullscreen mode or size specified on creation if created fullscreen). On GNOME, the window contents can still be updated in this state as the window is visible in the Activities view, however it is not screen size and should be.

Steps to reproduce:
1. Compile attached program with c++ $(sdl2-config --cflags --libs)
2. Run the program on GNOME
3. Press Super + H to hide the window
4. Press Super to show the Activities view

Expected result:
The program's window appears:
 - undecorated
 - all red, with a darker patch in the middle,
 - with the same proportions as its display, and
 - at the same size as any non-SDL fullscreen windows if any are present on the workspace.
(Basically, as it was before it was hidden, scaled to fit)

Actual result:
The window appears:
 - decorated,
 - with no dark red patch,
 - square, and
 - at most 64×64 pixels in size.
Comment 1 James Legg 2017-07-28 14:57:03 UTC
Created attachment 2810 [details]
Patch removing the fullscreen changes

This patch removes the change to non-fullscreen windows, which fixes the behaviour for the test program. However, I think this needs more thought when entering and leaving fullscreen would involve a video mode change (a subset of the SDL_WINDOW_FULLSCREEN but not SDL_WINDOW_FULLSCREEN_DESKTOP case), and I haven't tested this on other platforms.