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

Add support on MacOS to detect when the accessibility permission is removed #1636

Open
wants to merge 2 commits into
base: master
Choose a base branch
from

Conversation

sirnacnud
Copy link

@sirnacnud sirnacnud commented Apr 5, 2022

On macOS if you are running the barrier server and you remove the accessibility permission in System Preferences, your computer becomes unusable. You are able to move the mouse pointer around, but no clicks go through and none of the keyboard input either. I had to manually restart my computer using the power button. I guess what happens is that barrier continues to capture the input, but can't forward it on as the accessibility permission has been removed.

My fix is to periodically check if the accessibility permission is enabled and if not, terminate the application. MacOS provides no API to be notified when this permission changes, so we have to basically poll it. The fix currently checks every second, but only when barrier is started.

Contributor Checklist:

  • I have created a file in the doc/newsfragments directory IF it is a
    user-visible change (and make sure to read the README.md in that directory)

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.

None yet

1 participant