- print "looking for : " + state.appname + " : " + state.appclass + \
- " : " + state.role
-
- i = _find(data.screen, state)
- if i >= 0:
- coords = _data[data.screen][i]
- print "Found in history ("+str(coords.x)+","+str(coords.y)+")"
- data.client.move(coords.x, coords.y)
- else:
- print "No match in history"
- if fallback: fallback(data)
+ try:
+ if not confirm_callback or confirm_callback(data):
+ print "looking for : " + state.appname + " : " + \
+ state.appclass + " : " + state.role
+
+ i = _find(data.screen, state)
+ if i >= 0:
+ coords = _data[data.screen][i]
+ print "Found in history ("+str(coords.x)+","+\
+ str(coords.y)+")"
+ data.client.move(coords.x, coords.y)
+ return
+ else:
+ print "No match in history"
+ except TypeError:
+ pass
+ if fallback: fallback(data)