From 8a30f8a98ef25d71a215ac7090013bdc15b616ac Mon Sep 17 00:00:00 2001 From: "Veronica K. B. Olsen" <1619840+vkbo@users.noreply.github.com> Date: Sat, 9 Nov 2019 14:11:03 +0100 Subject: [PATCH] That didn't work, trying a better approach to save full screen state --- nw/guimain.py | 14 ++++++++------ 1 file changed, 8 insertions(+), 6 deletions(-) diff --git a/nw/guimain.py b/nw/guimain.py index efefc4c9..2f8d943a 100644 --- a/nw/guimain.py +++ b/nw/guimain.py @@ -729,14 +729,16 @@ class GuiMain(QMainWindow): doesn't have access to the exact state of the window. """ - self.mainConf.isFullScreen = not self.mainConf.isFullScreen - if self.mainConf.isFullScreen: - logger.debug("Activating full screen mode") - else: - logger.debug("Deactivating full screen mode") - self.setWindowState(self.windowState() ^ Qt.WindowFullScreen) + winState = self.windowState() & Qt.WindowFullScreen == Qt.WindowFullScreen + if winState: + logger.debug("Activated full screen mode") + else: + logger.debug("Deactivated full screen mode") + + self.mainConf.isFullScreen = winState + return ##