summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorCalum Lind <calumlind+deluge@gmail.com>2014-07-07 22:07:56 +0100
committerCalum Lind <calumlind+deluge@gmail.com>2014-07-07 22:07:56 +0100
commit59fa974b3bac69c80b3fc40cbe6cf5a78e606993 (patch)
tree67629ea9d8c329b18930e11c01488c912b3132dd
parent98e8418087bcb508b71371cf49ed81be7fd49b35 (diff)
downloaddeluge-59fa974b3bac69c80b3fc40cbe6cf5a78e606993.tar.gz
deluge-59fa974b3bac69c80b3fc40cbe6cf5a78e606993.tar.bz2
deluge-59fa974b3bac69c80b3fc40cbe6cf5a78e606993.zip
[#2315] [GTKUI] Potential fix for lost window on Win32
-rw-r--r--deluge/ui/gtkui/mainwindow.py8
1 files changed, 6 insertions, 2 deletions
diff --git a/deluge/ui/gtkui/mainwindow.py b/deluge/ui/gtkui/mainwindow.py
index cc5cbb7f3..420ddb889 100644
--- a/deluge/ui/gtkui/mainwindow.py
+++ b/deluge/ui/gtkui/mainwindow.py
@@ -133,8 +133,12 @@ class MainWindow(component.Component):
def restore():
# Restore the proper x,y coords for the window prior to showing it
try:
- self.config["window_x_pos"] = self.window_x_pos
- self.config["window_y_pos"] = self.window_y_pos
+ if self.window_x_pos == -32000 or self.window_y_pos == -32000:
+ self.config["window_x_pos"] = 0
+ self.config["window_y_pos"] = 0
+ else:
+ self.config["window_x_pos"] = self.window_x_pos
+ self.config["window_y_pos"] = self.window_y_pos
except:
pass
try: