From c31c1b00b12bb6dae0941504870e2357f40174f3 Mon Sep 17 00:00:00 2001 From: Calum Lind Date: Mon, 7 Jul 2014 22:07:56 +0100 Subject: [PATCH] [#2315] [GTKUI] Potential fix for lost window on Win32 --- deluge/ui/gtkui/mainwindow.py | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/deluge/ui/gtkui/mainwindow.py b/deluge/ui/gtkui/mainwindow.py index 84cdc24cf..9e7113450 100644 --- a/deluge/ui/gtkui/mainwindow.py +++ b/deluge/ui/gtkui/mainwindow.py @@ -166,8 +166,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: