From e9239be691a9e39ed0fc76028db3fbc7d4a35341 Mon Sep 17 00:00:00 2001 From: John Garland Date: Sat, 18 Feb 2012 12:24:13 +1100 Subject: [PATCH] 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. --- deluge/ui/gtkui/mainwindow.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/deluge/ui/gtkui/mainwindow.py b/deluge/ui/gtkui/mainwindow.py index 992e4b930..4dcd6c4ec 100644 --- a/deluge/ui/gtkui/mainwindow.py +++ b/deluge/ui/gtkui/mainwindow.py @@ -254,7 +254,7 @@ class MainWindow(component.Component): if event.new_window_state & gtk.gdk.WINDOW_STATE_MAXIMIZED: log.debug("pos: %s", self.window.get_position()) self.config["window_maximized"] = True - else: + elif not event.new_window_state & gtk.gdk.WINDOW_STATE_WITHDRAWN: self.config["window_maximized"] = False if event.changed_mask & gtk.gdk.WINDOW_STATE_ICONIFIED: if event.new_window_state & gtk.gdk.WINDOW_STATE_ICONIFIED: