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:
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(