From edbfbf2f2fc43f45d97ec5cd1d7ebddf194ae19c Mon Sep 17 00:00:00 2001
From: Morph <39850852+Morph1984@users.noreply.github.com>
Date: Thu, 3 Feb 2022 23:12:40 -0500
Subject: main: Always remove the frameless window flag when restoring UI state

For unknown reasons, this flag may persist after the application has been closed.
Removing this flag when restoring the UI state ensures that a frameless window will not be shown on startup.
---
 src/yuzu/main.cpp | 2 ++
 1 file changed, 2 insertions(+)

(limited to 'src/yuzu/main.cpp')

diff --git a/src/yuzu/main.cpp b/src/yuzu/main.cpp
index 556d2cdb38..c788db12dc 100644
--- a/src/yuzu/main.cpp
+++ b/src/yuzu/main.cpp
@@ -1052,8 +1052,10 @@ void GMainWindow::SetDefaultUIGeometry() {
 }
 
 void GMainWindow::RestoreUIState() {
+    setWindowFlags(windowFlags() & ~Qt::FramelessWindowHint);
     restoreGeometry(UISettings::values.geometry);
     restoreState(UISettings::values.state);
+    render_window->setWindowFlags(render_window->windowFlags() & ~Qt::FramelessWindowHint);
     render_window->restoreGeometry(UISettings::values.renderwindow_geometry);
 #if MICROPROFILE_ENABLED
     microProfileDialog->restoreGeometry(UISettings::values.microprofile_geometry);
-- 
cgit v1.2.3-70-g09d2