-
Notifications
You must be signed in to change notification settings - Fork 65
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
Various fixes #108
Various fixes #108
Conversation
not entirely sure this is correct, but unless the async code actually blocks until the block executes then this was incorrect previously
there are more to do here still though
This could be much friendlier, but it works
repeated calls to IOHIDManagerScheduleWithRunLoop cause an assertion failure in 10.15+. This code is brittle in the presence of multiple rapid calls (esp in conjunction with the automated disables/enables that yubiswitch can emit on timers and other events), but this will make it a bit better
@reaperhulk Thank you so much for this! I hope @pallotron has a chance to incorporate these and cut a new build 🔜. I've got an M1 personal machine and we've started to move to M1s for work as well. I really miss YubiSwitcher on my M1! |
Thanks! Sorry about late merge. I don't have much time to dedicate to personal projects. In fact I should probably seek a new owner for this project :) |
You might want to shift this repo to its own GitHub org to make it easier to expand maintainers and manage it. I’m not familiar with best practices for managing an OSS project that also needs an apple developer subscription for signing/notarizarion though. I would be willing to help out (although I emphasize that I am not an objective-C developer, I was just motivated to get this working 😂) |
I can help out and have a developer account to perform releases. |
@reaperhulk : thanks so much for this fix, I'm looking forward to taking advantage of it. |
Sure thing, I'll do it this evening. |
Let me add you as maintainer on this project. Thanks @davidrothera |
This PR makes a variety of changes to the project, some of which may be desirable, some of which could be better. I've tried to separate each commit so they can be cherry-picked or improved as you desire. 😄
The changes:
xpc_connection_send_message_with_reply
toxpc_connection_send_message_with_reply_sync
because it appeared there was a race condition in the async code in the action selector assumingxpc_connection_send_message_with_reply
immediately returns. Maybe I'm wrong about this though (please let me know if so!)IOHIDManagerScheduleWithRunLoop
with the samehidManager
. In macOS 10.15+ this causes an assertion failure.As a consequence of these changes yubiswitch does now properly disable on start (previously I had to toggle it on and off a few times to reliably get it to disable).