fix some junk related to determining window height/width, b_width and tb_height, comment out the window_foreign_new() that's screwing up the window right now

This commit is contained in:
eblade 2009-06-10 12:58:14 -04:00
parent bde0c7bb08
commit 6e63e2a5e9
2 changed files with 15 additions and 4 deletions

View File

@ -92,6 +92,8 @@ if __name__=="__main__":
print "game =", table.get_game()
fake = fake_hud(table)
print "fake =", fake
gobject.timeout_add(100, check_on_table, table, fake)
print "calling main"
gtk.main()

View File

@ -65,8 +65,11 @@ class Table(Table_Window):
print "x = %s y = %s width = %s height = %s" % (x, y, width, height)
self.x = int(x) + b_width
self.y = int(y) + tb_height
self.height = int(height) - b_width - tb_height
self.width = int(width) - 2*b_width
self.width = width - x
self.height = height - y
print "x = %s y = %s width = %s height = %s" % (self.x, self.y, self.width, self.height)
#self.height = int(height) - b_width - tb_height
#self.width = int(width) - 2*b_width
self.exe = self.get_nt_exe(hwnd)
self.title = titles[hwnd]
@ -82,6 +85,8 @@ class Table(Table_Window):
try:
(x, y, width, height) = win32gui.GetWindowRect(hwnd)
width = width - x
height = height - y
return {'x' : int(x) + b_width,
'y' : int(y) + tb_height,
'width' : int(height) - b_width - tb_height,
@ -128,8 +133,12 @@ class Table(Table_Window):
for w in tl_windows:
if w[1] == unique_name:
hud.main_window.gdkhandle = gtk.gdk.window_foreign_new(w[0])
hud.main_window.gdkhandle.set_transient_for(self.gdkhandle)
# hud.main_window.gdkhandle = gtk.gdk.window_foreign_new(w[0])
# hud.main_window.gdkhandle.set_transient_for(self.gdkhandle)
rect = self.gdkhandle.get_frame_extents()
(innerx, innery) = self.gdkhandle.get_origin()
b_width = rect.x - innerx
tb_height = rect.y - innery
#
# style = win32gui.GetWindowLong(self.number, win32con.GWL_EXSTYLE)
# style |= win32con.WS_CLIPCHILDREN