From 509192d23e491db9e4a01406b59bac0c36d96d88 Mon Sep 17 00:00:00 2001 From: eblade Date: Wed, 11 Mar 2009 17:12:35 -0400 Subject: [PATCH] call update_table_position() immediatly after creating a hud mainwindow, so that we can be sure we have both X/Y set on all platforms --- pyfpdb/Hud.py | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/pyfpdb/Hud.py b/pyfpdb/Hud.py index 279798c0..07396f61 100644 --- a/pyfpdb/Hud.py +++ b/pyfpdb/Hud.py @@ -155,6 +155,8 @@ class Hud: self.main_window.parentgdkhandle = gtk.gdk.window_foreign_new(int(self.table.number)) # gets a gdk handle for poker client self.main_window.gdkhandle = gtk.gdk.window_foreign_new(self.main_window.window.xid) # gets a gdk handle for the hud table window self.main_window.gdkhandle.set_transient_for(self.main_window.parentgdkhandle) # + + self.update_table_position() def update_table_position(self): if os.name == 'nt': @@ -197,7 +199,8 @@ class Hud: self.aux_windows = [] def reposition_windows(self, *args): - map(lambda x: x.window.move(x.x, x.y), self.stat_windows) + if self.stat_windows and len(self.stat_windows > 0): + map(lambda x: x.window.move(x.x, x.y), self.stat_windows) return True def debug_stat_windows(self, *args):