Merge pull request #1145 from auouymous/delay-window-position-restore
Delay restoring window position until after it has been shown.
This commit is contained in:
commit
69e242184c
|
@ -165,6 +165,12 @@ class UIConfig(config.Config):
|
|||
window.set_position(Gtk.WindowPosition.CENTER_ON_PARENT)
|
||||
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)
|
||||
|
||||
# Ignore events while we're connecting to the window
|
||||
self.__ignore_window_events = True
|
||||
|
|
Loading…
Reference in New Issue