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

MainWindow, Bugfix: Initialize geometries before calling GetWindowSystemInfo #12794

Merged
merged 1 commit into from
May 31, 2024

Conversation

TryTwo
Copy link
Contributor

@TryTwo TryTwo commented May 23, 2024

https://bugs.dolphin-emu.org/issues/11191
https://bugs.dolphin-emu.org/issues/13355

On Windows:
InitControllers() -> GetWindowSystemInfo -> wsi.render_window being set will set/save the initial geometry, which will cause sizing bugs until it's set again by the user resizing/repositioning.

Not tested on other platforms. I don't see any problem with moving InitControllers() down, but someone should double check.

If the normal sized window is very small there will still be some issues with maximized windows restoring geometry, but that's more of a Qt bug.

On Windows:
wsi.render_window being set will set/save the initial geometry, which will cause sizing bugs until it's set again by the user resizing/repositioning.
@Tilka
Copy link
Member

Tilka commented May 25, 2024

Works fine in gnome-shell. Side note: for a while now, Dolphin has had an irritating pop-in effect, at least on Linux. Not sure when it started. If you maximize Dolphin, close it, and reopen, it first gets drawn unmaximized, then quickly afterwards gets drawn maximized.

@TryTwo
Copy link
Contributor Author

TryTwo commented May 25, 2024

Thanks for testing! Would need to know generally when it broke, as I don't see any obvious changes. This PR changes code that has been there for a long time, rather than recent stuff.

Copy link
Contributor

@AdmiralCurtiss AdmiralCurtiss left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Seems fine.

@AdmiralCurtiss AdmiralCurtiss merged commit 0e6db07 into dolphin-emu:master May 31, 2024
11 checks passed
@Owlet7
Copy link

Owlet7 commented Jun 3, 2024

This commit partially broke batch mode — Dolphin now initialises the GUI window when run with the -b / --batch command line arguments.

@CasualPokePlayer
Copy link
Contributor

This commit also "breaks" dark mode on Windows slightly. Show() is the "proper" function to show the window, not show(), as Show() handles setting dark mode before actually showing the window (and also ends up checking for batch mode, like the later PR/code does). If you set dark mode after the window is visible (or unset it after setting it), it won't actually update the window title bar (until the user interacts with the app in some way that forces an update). This is due to windows hard caching the window theme, making it particularly annoying to update it programmatically (the simplest way to do so is to hide and reshow the window). With this change the window is shown before dark mode is set, therefore the user ends up seeing a mismatch (or at least sometimes, it appears to only be an issue if the system color mode is set to Light rather than Dark, and of course assuming the user set Dolphin's theme to Dark and not System for whatever reason)

@TryTwo TryTwo deleted the PR_Windows_Initialize_Fix branch June 24, 2024 19:28
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Development

Successfully merging this pull request may close these issues.

5 participants