Debug information about screens on first restore

This commit is contained in:
Kovid Goyal 2022-10-18 09:16:40 +05:30
parent cd8308765a
commit 0fbbc255b3
No known key found for this signature in database
GPG Key ID: 06BC317B515ACE7C

View File

@ -159,8 +159,17 @@ def _restore_geometry(self: QWidget, prefs: dict, name: str) -> bool:
return _restore_to_new_screen(self, s, x)
screen_debug_has_been_output = False
def restore_geometry(self: QWidget, prefs: dict, name: str) -> bool:
if restore_geometry(self, prefs, name):
global screen_debug_has_been_output
if not screen_debug_has_been_output:
screen_debug_has_been_output = True
debug('Screens currently in system:')
for screen in QApplication.instance().screens():
debug(screen_as_dict(screen))
if _restore_geometry(self, prefs, name):
return True
sz = self.sizeHint()
if sz.isValid():