Skip to content

Conversation

@elipsitz
Copy link

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.

Fixes #247 .

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".
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant