From ab7b93d4d71403981a1e16bb1c0aec881bc08f35 Mon Sep 17 00:00:00 2001 From: auouymous Date: Sat, 11 Mar 2023 16:10:27 -0700 Subject: [PATCH] Fix commit 1725b471fa0cf1c942c9766b13c9e2061b1b6423. The window manager needs a position to unmaximize window to. --- src/gpodder/gtkui/config.py | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/src/gpodder/gtkui/config.py b/src/gpodder/gtkui/config.py index 5eea4e75..67ab8f91 100644 --- a/src/gpodder/gtkui/config.py +++ b/src/gpodder/gtkui/config.py @@ -186,14 +186,16 @@ class UIConfig(config.Config): # https://github.com/gpodder/gpodder/pull/933#issuecomment-818039693 if cfg.x == -1 or cfg.y == -1: window.set_position(Gtk.WindowPosition.CENTER_ON_PARENT) - elif not cfg.maximized: + else: window.move(cfg.x, cfg.y) # From Gtk docs: most window managers ignore requests for initial window # positions (instead using a user-defined placement algorithm) and honor # requests after the window has already been shown. # Move it a second time after the window has been shown. - # The first move reduces chance of window jumping. - util.idle_add(window.move, cfg.x, cfg.y) + # The first move reduces chance of window jumping, + # and gives the window manager a position to unmaximize to. + if not cfg.maximized: + util.idle_add(window.move, cfg.x, cfg.y) # Ignore events while we're connecting to the window self.__ignore_window_events = True