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

Exiting fullscreen on Windows can cause resizing of other windows #763

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

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 1.2
Reported for operating system, platform: Windows (All), All

Comments on the original bug report:

On 2016-05-02 18:24:23 +0000, Simon Hug wrote:

Created attachment 2436
Diff for a fix.

When SDL exits fullscreen on Windows, the mode change is not marked as temporary. This causes windows resized and icons on the desktop moved if it exists from a small resolution.

To fix this, the call to ChangeDisplaySettings should mark the change as temporary.

On 2016-05-05 06:01:31 +0000, Simon Hug wrote:

Created attachment 2442
Fixes the mode change in SDL2.

I thought only SDL 1.2 is affected, but SDL 2 is doing the same thing. Here's a patch for SDL 2.

On 2016-05-23 18:30:16 +0000, Alex Szpakowski wrote:

Applied via https://hg.libsdl.org/SDL/rev/e49caa693be5 and https://hg.libsdl.org/SDL/rev/7cbfd97f1430 , thanks!

On 2016-05-23 21:01:31 +0000, Philipp Wiesemann wrote:

The applied patch for SDL 2.0 [1] partially reverted an earlier fix for switching from fullscreen to window. [2] It looks like this would handle the case where the resolution is the same.

However, I do not know if the earlier problem still exists or which is more important now. :)

[1] https://hg.libsdl.org/SDL/rev/7cbfd97f1430
[2] https://hg.libsdl.org/SDL/rev/513d97ffe10d

On 2016-05-23 21:25:44 +0000, Alex Szpakowski wrote:

I do remember that earlier problem before it was fixed, but I can't reproduce it now even after the latest commits. Can anyone else?

On 2016-05-26 19:42:37 +0000, Philipp Wiesemann wrote:

I do not get the black screen even if I remove the older fix. So either the black screen is currently prevented from elsewhere or I did something wrong. :)

Also, I get no resized windows with and without the newer fix (for SDL 2.0). SDL_WINDOW_FULLSCREEN was used (not SDL_WINDOW_FULLSCREEN_DESKTOP).

On 2016-05-27 06:12:07 +0000, Simon Hug wrote:

Yeah, I don't get any of these mode changes on exit when removing the newer lines in tip. And there's no actual call to WIN_SetDisplayMode on exiting when testing the parent of [1] so I'm wondering where that comes from. Well, seems fixed now, right?

Now, other windows moving or resizing when exiting fullscreen is a bit harder to reproduce, I guess. I'm currently testing on Windows 8.1 and the CDS_FULLSCREEN flag definitely did help, although in my case the windows are not resizing but just moving to the lower-right corner if I leave out the flag.

Google Chrome is behaving a bit weird though. It seems this program always wants to fit somehow and resizes itself. (Do they watch for mode changes?)

[1] https://hg.libsdl.org/SDL/rev/513d97ffe10d

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant