search string for table detect changed

This commit is contained in:
Gerko de Roo 2009-12-23 21:12:56 +01:00
parent 207277e55a
commit f1e6b597a2
2 changed files with 2 additions and 2 deletions

View File

@ -512,7 +512,7 @@ or None if we fail to get the info """
def getTableTitleRe(type, table_name=None, tournament = None, table_number=None):
"Returns string to search in windows titles"
if type=="tour":
return "%s.+Table\s%s" % (tournament, table_number)
return "%s.+Table.+%s" % (tournament, table_number)
else:
return table_name

View File

@ -161,7 +161,7 @@ def discover_posix_by_name(c, tablename):
def discover_posix_tournament(c, t_number, s_number):
"""Finds the X window for a client, given tournament and table nos."""
search_string = "%s.+Table\s%s" % (t_number, s_number)
search_string = "%s.+Table.+%s" % (t_number, s_number)
for listing in os.popen('xwininfo -root -tree').readlines():
if re.search(search_string, listing):
return decode_xwininfo(c, listing)