RaiMan / SikuliX-2014

SikuliX version 1.1.2 (until February 2018)
http://sikulix.com
805 stars 235 forks source link

Search entire window title in Linux findWindow() #282

Closed rettops closed 6 years ago

rettops commented 6 years ago

The LinuxUtil.java 'findWindow()' uses "wmctrl -lpGx" to get info about the window. It splits the result on any whitespace, and then tries to match the given appName against fields 7 or 9. However, if the title has spaces then only the first word is in field 9. Changing the split to have a limit results in having the entire title available. Also, it makes more sense to do the 'contains' search on field 9 (the title) rather than field 7 (the "class").

rettops commented 6 years ago

Testing is easy: