summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorJohn Garland <johnnybg+deluge@gmail.com>2012-02-18 12:24:13 +1100
committerJohn Garland <johnnybg+deluge@gmail.com>2012-02-18 12:34:05 +1100
commitf5956f01e77fa1bc2141b3add5ff65221c0f5038 (patch)
tree2db3daea40ed17cf8af7ec101a08fcba08d0d453
parent717db367e867f07b88c0d6e1db713b76eb82e87a (diff)
downloaddeluge-f5956f01e77fa.zip
deluge-f5956f01e77fa.tar.gz
deluge-f5956f01e77fa.tar.bz2
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.
-rw-r--r--deluge/ui/gtkui/mainwindow.py2
1 files changed, 1 insertions, 1 deletions
diff --git a/deluge/ui/gtkui/mainwindow.py b/deluge/ui/gtkui/mainwindow.py
index 910459d..fec8af1 100644
--- a/deluge/ui/gtkui/mainwindow.py
+++ b/deluge/ui/gtkui/mainwindow.py
@@ -202,7 +202,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: