-
Notifications
You must be signed in to change notification settings - Fork 62
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
Reduce eventWithCGEvent:
call.
#15
base: master
Are you sure you want to change the base?
Conversation
fc4b67d
to
f8b45c3
Compare
|
||
NS_ASSUME_NONNULL_BEGIN | ||
|
||
static const uint32_t kCGEventFieldTouchContxtID = 0x92; |
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.
Typo -> kCGEventFieldTouchContextID
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.
Oops!
I tested this branch briefly in the profiler. The good news:
The bad news:
To run these tests I open up Haptic Key and repeatedly tap or move the mouse cursor in circular patterns while running the Time Profiler in Instruments, or keep an eye on CPU Usage in Activity Monitor.
|
f8b45c3
to
cbd88ed
Compare
True. As I separate event tap to the own runloop on the different thread than NSApplication’s runloop, then see cleaner call tree, but still most of time is spent to process As long as we’re using Probably there are yet another solution to listen only events on Touch Bar, but I didn’t investigate yet. |
Will it ever be merged? Or is this app is obsolete? |
Any updates? I really want to use this app, but if it costs battery life then I prefer the battery. |
CGEvent
directly without converting toNSEvent
kCGEventFieldTouchContextID
before convertingNSEvent
to reduceeventWithCGEvent:
call.