Ignore unmaximise event when window isn't visible

This fixes the bug where a maximised main window
will become unmaximised (on restart) after
quitting deluge from the system tray.
This commit is contained in:
John Garland 2012-02-18 12:24:13 +11:00 committed by Calum Lind
parent 8452b63d19
commit e9239be691
1 changed files with 1 additions and 1 deletions

View File

@ -254,7 +254,7 @@ class MainWindow(component.Component):
if event.new_window_state & gtk.gdk.WINDOW_STATE_MAXIMIZED: if event.new_window_state & gtk.gdk.WINDOW_STATE_MAXIMIZED:
log.debug("pos: %s", self.window.get_position()) log.debug("pos: %s", self.window.get_position())
self.config["window_maximized"] = True self.config["window_maximized"] = True
else: elif not event.new_window_state & gtk.gdk.WINDOW_STATE_WITHDRAWN:
self.config["window_maximized"] = False self.config["window_maximized"] = False
if event.changed_mask & gtk.gdk.WINDOW_STATE_ICONIFIED: if event.changed_mask & gtk.gdk.WINDOW_STATE_ICONIFIED:
if event.new_window_state & gtk.gdk.WINDOW_STATE_ICONIFIED: if event.new_window_state & gtk.gdk.WINDOW_STATE_ICONIFIED: