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
WIP: Ensure Accessibility permissions on macOS #41
WIP: Ensure Accessibility permissions on macOS #41
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Is it possible to add a button on the alert that opens the accessibility settings? I think I've seen that somewhere.
I found these https://macosxautomation.com/system-prefs-links.html which work as links, but I'm still looking for a way to make the button press "open" the link to the accessibility settings. A standard Found it. Need to call |
This pull request introduces 4 alerts when merging 890b6d6 into 25ae699 - view on LGTM.com new alerts:
|
This pull request introduces 1 alert when merging f032ed1 into 25ae699 - view on LGTM.com new alerts:
|
Using a native python thread causes a
Error. Will need to look into using macOS's own work queue (https://developer.apple.com/documentation/dispatch/1452927-dispatch_get_global_queue?language=objc ) |
If the issue is that the stuff needs to happen on the main thread, try
using the Python multiprocessing module? A bit hacky but will probably
work.
…On Sun, 29 Mar 2020, 17:49 Kerkko Pelttari, ***@***.***> wrote:
Using a native python thread causes a ```objc.error:
NSInternalInconsistencyException - NSWindow drag regions should only be
invalidated on the Main Thread!
Assertion failed: (NSViewIsCurrentlyBuildingLayerTreeForDisplay() !=
currentlyBuildingLayerTree), function
NSViewSetCurrentlyBuildingLayerTreeForDisplay, file
/BuildRoot/Library/Caches/com.apple.xbs/Sources/AppKit/AppKit-1894.30.142/AppKit.subproj/NSView.m,
line 13568.
fish: 'python aw_watcher_window/__main…' terminated by signal SIGILL
(Illegal instruction)```Error. Will need to look into using macOS's own
work queue (
https://developer.apple.com/documentation/dispatch/1452927-dispatch_get_global_queue?language=objc
)
—
You are receiving this because you commented.
Reply to this email directly, view it on GitHub
<#41 (comment)>,
or unsubscribe
<https://github.com/notifications/unsubscribe-auth/AAKXDOW67AZCNZR2TDZXBA3RJ5UZ7ANCNFSM4LVTVLEA>
.
|
Seems like it should work. I'll look into it later this week. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Forgot to re-review.
LGTM, feel free to fix up the conflict and merge :)
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Woops, just skimmed the diff and missed there were things left to do in the comments. Sorry.
caa43d0
to
0943007
Compare
Multiprocessing got rid of the It does now block execution though... which is weird. The window watcher continues execution after I close the modal. I think I resolved the conflict correctly, will need to see what CI says. |
This pull request introduces 1 alert when merging 3ad2af6 into 620b52c - view on LGTM.com new alerts:
|
…in main.py after logging has bene initialized
This pull request introduces 1 alert when merging b829e04 into 620b52c - view on LGTM.com new alerts:
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@xylix Looks like all issues have been resolved. Is this ready to merge?
There might have still been some problem, I'll need to manually test on macOS before I can be sure. I'll get that done tomorrow, bit busy today. |
@ErikBjare Looks fine to merge, I tested it locally and solved the conflict of the lock file. |
This pull request introduces 1 alert when merging 724a3e2 into 8075f16 - view on LGTM.com new alerts:
|
@xylix Are the two things in the top comment resolved? |
@ErikBjare Oh right. I guess the other one is not, because it is actually pretty hard in recent macOS to set a setting from dialog. Instead the dialog just gives a message and |
@xylix Should we just leave it as is then and merge? |
Yeah I think we should. The other open PR requires more work before it is ready but this one will be an improvement even in it's current form. |
Nice! Merging. |

Use AppKit to figure if we have accessibility perms and pyobjc to ask for them.Still needs to: