From b75b3f69b783ea7d8919f58d2c86dfa7c9dc6a69 Mon Sep 17 00:00:00 2001 From: Nadia Holmquist Pedersen Date: Wed, 27 Jan 2021 00:14:24 +0100 Subject: [PATCH] Don't save the window size to the config if in full screen (#933) --- src/frontend/qt_sdl/main.cpp | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/src/frontend/qt_sdl/main.cpp b/src/frontend/qt_sdl/main.cpp index 527a5070..a3b02495 100644 --- a/src/frontend/qt_sdl/main.cpp +++ b/src/frontend/qt_sdl/main.cpp @@ -1474,8 +1474,11 @@ void MainWindow::resizeEvent(QResizeEvent* event) int w = event->size().width(); int h = event->size().height(); - Config::WindowWidth = w; - Config::WindowHeight = h; + if (mainWindow != nullptr && !mainWindow->isFullScreen()) + { + Config::WindowWidth = w; + Config::WindowHeight = h; + } // TODO: detect when the window gets maximized! }