X11WindowDriver uses XGetWindowPropertyRef to get a reference
to the properties of the active window. If this fails, however,
the outer function findFocusedWindow does not return "NO" to
indicate failure, because the result of the inner block is
ignored. This change makes sure findFocusedWindow returns "NO" if the
inner block returns "NO".
Reproduce/test by using a GTK window, like sylpheed as suggested in the window, or this ginput/matplotlib Python script:
import matplotlib.pyplot as plt
plt.title("test ginput")
x = plt.ginput(n=0, timeout=-1)
Trying to use ShiftIt on the window still won't work, but ShiftIt will no longer crash.
X11WindowDriver uses
XGetWindowPropertyRef
to get a reference to the properties of the active window. If this fails, however, the outer function findFocusedWindow does not return "NO" to indicate failure, because the result of the inner block is ignored. This change makes sure findFocusedWindow returns "NO" if the inner block returns "NO".Reproduce/test by using a GTK window, like sylpheed as suggested in the window, or this ginput/matplotlib Python script:
Trying to use ShiftIt on the window still won't work, but ShiftIt will no longer crash.
Fixes #247 .