From bcea43dc6a8c67821cac079284fe2f7089fd4657 Mon Sep 17 00:00:00 2001 From: RumovZ Date: Tue, 7 Dec 2021 23:12:10 +0100 Subject: [PATCH] Disable saving fullscreen geometry (#1538) Restoring fullscreen windows is buggy. https://forums.ankiweb.net/t/anki-2-1-50-beta/15608/39 --- qt/aqt/utils.py | 10 ++++------ 1 file changed, 4 insertions(+), 6 deletions(-) diff --git a/qt/aqt/utils.py b/qt/aqt/utils.py index d2ce88324..f64f72f21 100644 --- a/qt/aqt/utils.py +++ b/qt/aqt/utils.py @@ -510,12 +510,10 @@ def getSaveFile( def saveGeom(widget: QWidget, key: str) -> None: - key += "Geom" - if is_mac and (widget.windowState() & Qt.WindowState.WindowFullScreen): - geom = None - else: - geom = widget.saveGeometry() - aqt.mw.pm.profile[key] = geom + # restoring a fullscreen window is buggy + # (at the time of writing; Qt 6.2.2 and 5.15) + if not widget.isFullScreen(): + aqt.mw.pm.profile[f"{key}Geom"] = widget.saveGeometry() def restoreGeom(