[Scummvm-git-logs] scummvm master -> f95bf24fd1aaab440c75c1fb1e0badcbe3cc20d5
criezy
noreply at scummvm.org
Sun Jun 5 16:56:36 UTC 2022
This automated email contains information about 1 new commit which have been
pushed to the 'scummvm' repo located at https://github.com/scummvm/scummvm .
Summary:
f95bf24fd1 MACOSX: Fix issue with restoring maximized window
Commit: f95bf24fd1aaab440c75c1fb1e0badcbe3cc20d5
https://github.com/scummvm/scummvm/commit/f95bf24fd1aaab440c75c1fb1e0badcbe3cc20d5
Author: Thierry Crozat (criezy at scummvm.org)
Date: 2022-06-05T17:56:30+01:00
Commit Message:
MACOSX: Fix issue with restoring maximized window
The SdlWindow::createOrUpdateWindow makes sure the created window
is not bigger than the desktop. When not in fullscreen, the window
borders are also considered, but on macOS a maximimized window is
borderless, so this resulted in maximized window being restored
smaller than they should have (and no longer maximized).
Changed paths:
backends/platform/sdl/sdl-window.cpp
diff --git a/backends/platform/sdl/sdl-window.cpp b/backends/platform/sdl/sdl-window.cpp
index 910b5eb9550..07264cf120a 100644
--- a/backends/platform/sdl/sdl-window.cpp
+++ b/backends/platform/sdl/sdl-window.cpp
@@ -368,8 +368,15 @@ bool SdlWindow::createOrUpdateWindow(int width, int height, uint32 flags) {
// basically worthless. So we'll just try to keep things closeish to the
// maximum for now.
Common::Rect desktopRes = getDesktopResolution();
- if (!fullscreenFlags) {
+ if (
+ !fullscreenFlags
+#if defined(MACOSX)
+ // On macOS a maximized window is borderless
+ && !(flags & SDL_WINDOW_MAXIMIZED)
+#endif
+ ) {
int top, left, bottom, right;
+
#if SDL_VERSION_ATLEAST(2, 0, 5)
if (!_window || SDL_GetWindowBordersSize(_window, &top, &left, &bottom, &right) < 0)
#endif
More information about the Scummvm-git-logs
mailing list