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
This commit is contained in:
parent
23c1e0c405
commit
509192d23e
|
@ -156,6 +156,8 @@ class Hud:
|
||||||
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 = 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.main_window.gdkhandle.set_transient_for(self.main_window.parentgdkhandle) #
|
||||||
|
|
||||||
|
self.update_table_position()
|
||||||
|
|
||||||
def update_table_position(self):
|
def update_table_position(self):
|
||||||
if os.name == 'nt':
|
if os.name == 'nt':
|
||||||
if not win32gui.IsWindow(self.table.number):
|
if not win32gui.IsWindow(self.table.number):
|
||||||
|
@ -197,7 +199,8 @@ class Hud:
|
||||||
self.aux_windows = []
|
self.aux_windows = []
|
||||||
|
|
||||||
def reposition_windows(self, *args):
|
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
|
return True
|
||||||
|
|
||||||
def debug_stat_windows(self, *args):
|
def debug_stat_windows(self, *args):
|
||||||
|
|
Loading…
Reference in New Issue
Block a user