search string for table detect changed

This commit is contained in:
Gerko de Roo 2009-12-23 21:12:56 +01:00 committed by Worros
parent 0e318e6d9f
commit 3553bdaf71
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

@ -160,7 +160,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)