Merge /home/reb402/workspace/free_poker_tools

This commit is contained in:
Eratosthenes 2011-01-26 17:11:17 -05:00
commit 010b153d9a

View File

@ -52,8 +52,8 @@ class Table(Table_Window):
if re.search(self.search_string, d.get(kCGWindowName, ""), re.I): if re.search(self.search_string, d.get(kCGWindowName, ""), re.I):
title = d[kCGWindowName] title = d[kCGWindowName]
if self.check_bad_words(title): continue if self.check_bad_words(title): continue
self.number = d[kCGWindowNumber] self.number = int(d[kCGWindowNumber])
self.title = title self.title = title; return self.title
if self.number is None: if self.number is None:
return None return None
@ -63,11 +63,11 @@ class Table(Table_Window):
WinListDict = CGWindowListCreateDescriptionFromArray(WinList) WinListDict = CGWindowListCreateDescriptionFromArray(WinList)
for d in WinListDict: for d in WinListDict:
if d[CGWindowNumber] == self.number: if d[kCGWindowNumber] == self.number:
return {'x' : d[kCGWindowBounds][X], return {'x' : int(d[kCGWindowBounds]['X']),
'y' : d[kCGWindowBounds][Y], 'y' : int(d[kCGWindowBounds]['Y']),
'width' : d[kCGWindowBounds][Width], 'width' : int(d[kCGWindowBounds]['Width']),
'height' : d[kCGWindowBounds][Height] 'height' : int(d[kCGWindowBounds]['Height'])
} }
return None return None
@ -86,5 +86,5 @@ class Table(Table_Window):
# the hud window was a dialog belonging to the table. # the hud window was a dialog belonging to the table.
# This is the gdkhandle for the HUD window # This is the gdkhandle for the HUD window
gdkwindow = gtk.gdk.window_foreign_new(window.number) gdkwindow = gtk.gdk.window_foreign_new(window.window.xid)
gdkwindow.set_transient_for(self.gdkhandle) gdkwindow.set_transient_for(window.window)