Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Correctly disables the XRecord context. (probably) #583

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

fukuchi
Copy link

@fukuchi fukuchi commented Jan 17, 2024

When using pynput on a Xorg server, if I start a MouseListener and/or KeyboardListener, stop it after a while, and then join, it does not join immediately. The join will not be completed until a mouse or key event occurs afterward. A test program can be retrieved from the following gist:

https://gist.github.com/fukuchi/b06c30f04cd69b396f127d2b781c1ff3

This is because the context enabled in _run() in _util/xorg.py is not correctly disabled in _stop_platform().

This pull request fixes this problem. However, I am not familiar with Xlib programming and XRecord extensions, so I am not sure why this works correctly.

I have tested this patch on Ubuntu 22.04 (Python 3.10.12) and Ubuntu 23.10 (Python 3.11.6).

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