Q&D change for old Hud code to remove the loop from one topify_window(), as we found out how to get it when working on the new Hud stuff
This commit is contained in:
parent
eb37de3594
commit
c63e0ab461
|
@ -339,30 +339,30 @@ class Hud:
|
|||
Stats.do_tip(window.e_box[r][c], tip)
|
||||
|
||||
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:
|
||||
# """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:
|
||||
self.main_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 = self.main_window.window
|
||||
self.main_window.gdkhandle.set_transient_for(self.main_window.parentgdkhandle)
|
||||
|
||||
style = win32gui.GetWindowLong(self.table.number, win32con.GWL_EXSTYLE)
|
||||
style |= win32con.WS_CLIPCHILDREN
|
||||
win32gui.SetWindowLong(self.table.number, win32con.GWL_EXSTYLE, style)
|
||||
break
|
||||
# break
|
||||
|
||||
window.set_title(real_name)
|
||||
# window.set_title(real_name)
|
||||
|
||||
class Stat_Window:
|
||||
|
||||
|
|
Loading…
Reference in New Issue
Block a user