move re-parenting code back into windows-only topify_window() function, as it is not 100% system independent (more like 99%)

This commit is contained in:
eblade 2008-10-26 05:39:43 -04:00
parent 7b604e3bec
commit d07fe6c5c6

View File

@ -93,11 +93,6 @@ class Hud:
if os.name == 'nt': if os.name == 'nt':
self.topify_window(self.main_window) self.topify_window(self.main_window)
# set as child of poker table
window.parentgdkhandle = gtk.gdk.window_foreign_new(long(self.table.number))
self.main_window.gdkhandle = gtk.gdk.window_foreign_new(w[0])
self.main_window.gdkhandle.set_transient_for(window.parentgdkhandle)
def on_button_press(self, widget, event): def on_button_press(self, widget, event):
if event.button == 3: if event.button == 3:
widget.popup(None, None, None, event.button, event.time) widget.popup(None, None, None, event.button, event.time)
@ -249,9 +244,9 @@ class Hud:
for w in tl_windows: for w in tl_windows:
if w[1] == unique_name: if w[1] == unique_name:
#win32gui.ShowWindow(w[0], win32con.SW_HIDE) #win32gui.ShowWindow(w[0], win32con.SW_HIDE)
#window.parentgdkhandle = gtk.gdk.window_foreign_new(long(self.table.number)) window.parentgdkhandle = gtk.gdk.window_foreign_new(long(self.table.number))
#self.main_window.gdkhandle = gtk.gdk.window_foreign_new(w[0]) self.main_window.gdkhandle = gtk.gdk.window_foreign_new(w[0])
#self.main_window.gdkhandle.set_transient_for(window.parentgdkhandle) self.main_window.gdkhandle.set_transient_for(window.parentgdkhandle)
#win32gui.ShowWindow(w[0], win32con.SW_SHOW) #win32gui.ShowWindow(w[0], win32con.SW_SHOW)
style = win32gui.GetWindowLong(self.table.number, win32con.GWL_EXSTYLE) style = win32gui.GetWindowLong(self.table.number, win32con.GWL_EXSTYLE)