Disable saving fullscreen geometry (#1538)

Restoring fullscreen windows is buggy.
https://forums.ankiweb.net/t/anki-2-1-50-beta/15608/39
This commit is contained in:
RumovZ 2021-12-07 23:12:10 +01:00 committed by GitHub
parent 9becb4c11f
commit bcea43dc6a
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -510,12 +510,10 @@ def getSaveFile(
def saveGeom(widget: QWidget, key: str) -> None: def saveGeom(widget: QWidget, key: str) -> None:
key += "Geom" # restoring a fullscreen window is buggy
if is_mac and (widget.windowState() & Qt.WindowState.WindowFullScreen): # (at the time of writing; Qt 6.2.2 and 5.15)
geom = None if not widget.isFullScreen():
else: aqt.mw.pm.profile[f"{key}Geom"] = widget.saveGeometry()
geom = widget.saveGeometry()
aqt.mw.pm.profile[key] = geom
def restoreGeom( def restoreGeom(