From 01861450653ce4fd9f1d1155b326270ea689e55d Mon Sep 17 00:00:00 2001 From: eblade Date: Wed, 3 Dec 2008 13:35:19 -0500 Subject: [PATCH] remove no-longer-needed "topify_window" for Stat_Window, removed some lines that were commented out due to no longer being needed, etc. Seems to fix the windows randomly re-attaching in Win32. --- pyfpdb/Hud.py | 31 +------------------------------ 1 file changed, 1 insertion(+), 30 deletions(-) diff --git a/pyfpdb/Hud.py b/pyfpdb/Hud.py index 3914f5ca..80ec9a82 100644 --- a/pyfpdb/Hud.py +++ b/pyfpdb/Hud.py @@ -386,41 +386,12 @@ class Stat_Window: font = pango.FontDescription("Sans 7") self.label[r][c].modify_font(font) -# if not os.name == 'nt': # seems to be a bug in opacity on windows self.window.set_opacity(parent.colors['hudopacity']) -# self.window.realize() self.window.move(self.x, self.y) -# self.window.show_all() -# set_keep_above(1) for windows - if os.name == 'nt': self.topify_window(self.window) + self.window.hide() - def topify_window(self, window): - """Set the specified gtk window to stayontop in MS Windows.""" - - def windowEnumerationHandler(hwnd, resultList): - '''Callback for win32gui.EnumWindows() to generate list of window handles.''' - resultList.append((hwnd, win32gui.GetWindowText(hwnd))) - - unique_name = 'unique name for finding this window' - real_name = window.get_title() - window.set_title(unique_name) - tl_windows = [] - win32gui.EnumWindows(windowEnumerationHandler, tl_windows) - - for w in tl_windows: - if w[1] == unique_name: - - #win32gui.SetWindowPos(w[0], win32con.HWND_TOPMOST, 0, 0, 0, 0, win32con.SWP_NOMOVE|win32con.SWP_NOSIZE) - -# style = win32gui.GetWindowLong(w[0], win32con.GWL_EXSTYLE) -# style |= win32con.WS_EX_TOOLWINDOW -# style &= ~win32con.WS_EX_APPWINDOW -# win32gui.SetWindowLong(w[0], win32con.GWL_EXSTYLE, style) - win32gui.ShowWindow(w[0], win32con.SW_SHOW) - window.set_title(real_name) - def destroy(*args): # call back for terminating the main eventloop gtk.main_quit()