Do not save or restore window position
This commit is contained in:
parent
c967f33583
commit
529a1e9425
|
@ -158,10 +158,7 @@ class UIConfig(config.Config):
|
|||
|
||||
if cfg.width != -1 and cfg.height != -1:
|
||||
window.resize(cfg.width, cfg.height)
|
||||
if cfg.x == -1 or cfg.y == -1:
|
||||
window.set_position(Gtk.WindowPosition.CENTER_ON_PARENT)
|
||||
else:
|
||||
window.move(cfg.x, cfg.y)
|
||||
window.set_position(Gtk.WindowPosition.CENTER_ON_PARENT)
|
||||
|
||||
# Ignore events while we're connecting to the window
|
||||
self.__ignore_window_events = True
|
||||
|
@ -169,12 +166,9 @@ class UIConfig(config.Config):
|
|||
# Get window state, correct size comes from window.get_size(),
|
||||
# see https://developer.gnome.org/SaveWindowState/
|
||||
def _receive_configure_event(widget, event):
|
||||
x_pos, y_pos = event.x, event.y
|
||||
width_size, height_size = widget.get_size()
|
||||
maximized = bool(event.window.get_state() & Gdk.WindowState.MAXIMIZED)
|
||||
if not self.__ignore_window_events and not maximized:
|
||||
cfg.x = x_pos
|
||||
cfg.y = y_pos
|
||||
cfg.width = width_size
|
||||
cfg.height = height_size
|
||||
|
||||
|
|
Loading…
Reference in New Issue