From d2ce4033828ad0a83f5e75b9b81ea155ab4b3cf7 Mon Sep 17 00:00:00 2001 From: RSDuck Date: Sun, 6 Oct 2024 18:59:19 +0200 Subject: [PATCH] do not restore fullscreen state from saved geometry --- src/frontend/qt_sdl/Window.cpp | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/src/frontend/qt_sdl/Window.cpp b/src/frontend/qt_sdl/Window.cpp index 3020defdd4..d35962b282 100644 --- a/src/frontend/qt_sdl/Window.cpp +++ b/src/frontend/qt_sdl/Window.cpp @@ -81,6 +81,7 @@ #include "EmuInstance.h" #include "ArchiveUtil.h" #include "CameraManager.h" +#include "Window.h" using namespace melonDS; @@ -261,6 +262,7 @@ MainWindow::MainWindow(int id, EmuInstance* inst, QWidget* parent) : setAttribute(Qt::WA_DeleteOnClose); setAcceptDrops(true); setFocusPolicy(Qt::ClickFocus); + //setWindowState(Qt::window) QMenuBar* menubar = new QMenuBar(); { @@ -666,6 +668,8 @@ MainWindow::MainWindow(int id, EmuInstance* inst, QWidget* parent) : QByteArray dec = QByteArray::fromBase64(raw, QByteArray::Base64Encoding | QByteArray::AbortOnBase64DecodingErrors); if (!dec.isEmpty()) restoreGeometry(dec); + // if the window was closed in fullscreen do not restore this + setWindowState(windowState() & ~Qt::WindowFullScreen); } show();