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

[SDL3]SDL_SetWindowFullscreen makes the window fullscreen on the wrong monitor #11571

Closed
edo9300 opened this issue Dec 2, 2024 · 9 comments · Fixed by #11621
Closed

[SDL3]SDL_SetWindowFullscreen makes the window fullscreen on the wrong monitor #11571

edo9300 opened this issue Dec 2, 2024 · 9 comments · Fixed by #11621
Assignees
Milestone

Comments

@edo9300
Copy link
Contributor

edo9300 commented Dec 2, 2024

On Windows, if "Show window contents while dragging" is disabled, moving a non maximized window from one screen to another and snapping it to maximized, will make a subsequent call to SDL_SetWindowFullscreen maximize it to the monitor it was previously in, instead of the current one, this works properly on SDL2

@slouken slouken added this to the 3.2.0 milestone Dec 2, 2024
@Kontrabant
Copy link
Contributor

Just to check, are you setting a video mode with SDL_SetWindowFullscreenMode() before entering fullscreen, or is this fullscreen desktop?

@edo9300
Copy link
Contributor Author

edo9300 commented Dec 3, 2024

No, it's default windowed borderless fullscreen, I'm not switching to exclusive fullscreen. If the show window contents is is enabled this issue doesn't arise instead

@Kontrabant
Copy link
Contributor

Kontrabant commented Dec 8, 2024

Found the issue, and working on a fix now. This uncovered an edge case on other platforms as well, where the window will be made fullscreen on the wrong display if a maximized window is moved to another display by the window manager.

@edo9300
Copy link
Contributor Author

edo9300 commented Feb 9, 2025

I retested this interaction on the latest sdl3 release, and it seems to be wrong again (it was working on sdl 3.1.8 and 3.1.10), but already in sdl 3.2.0 it starts behaving with this broken behaviour again

@icculus icculus reopened this Feb 9, 2025
@slouken slouken modified the milestones: 3.2.0, 3.2.6 Feb 10, 2025
@slouken
Copy link
Collaborator

slouken commented Feb 10, 2025

@Kontrabant, can you take a look?

@Kontrabant
Copy link
Contributor

Will do.

@Kontrabant
Copy link
Contributor

Kontrabant commented Feb 10, 2025

After dragging, the maximized window is made fullscreen on the correct display, but it is put on the wrong display when leaving fullscreen due to the fix needed for #12006. Working on it now.

@Kontrabant
Copy link
Contributor

The regression should be fixed now, without regressing #12006 either.

@edo9300
Copy link
Contributor Author

edo9300 commented Feb 21, 2025

Can confirm it works properly on the current master branch

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

Successfully merging a pull request may close this issue.

4 participants