Repository navigation
docs(research): Event-driven pointer input versus the 16 ms poll - #241
Merged
Merged
Conversation
5 tasks done
3 tasks done
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Why
#236 fixes #182 by patching the 16 ms poll with an edge bit. The owner asked whether the poll should go entirely in favour of reacting to input events — the design #183's comment proposes. That comment rests on a permission claim nobody had checked. This is the check.
What changed
One research note,
docs/research/event-driven-input-vs-polling.md, and thedocs/research/directory it lives in (the repo had none; ADRs record decisions taken, this is research feeding one). Every platform claim is cited to Apple, X.Org, Wayland, tao, or x11rb sources; three claims Apple's docs do not settle are marked unverified rather than asserted.The short answer, from the note:
CGEventTapCreategate for key events and says nothing about mouse-only listen-only session taps. The relevant TCC class is Input Monitoring, not Accessibility as The frame loop keeps polling at 60Hz when the desktop is idle #183 says. Nothing can be designed on that premise until a spike tests it against a fresh TCC database.x11rbhas thexinputfeature; the repo does not enable it yet.recv()when idle only if a mouse-moved tap is also permission-free. The saving is bounded to the fully idle case.Witness::takeis the one-bit queue. A tap would change the producer, not the read.Recommendation: merge #236; re-scope #183 into a permission spike before any loop rewrite.
How to verify
Read the note against its citations. The macOS spike it proposes is the next concrete step:
tccutil reset ListenEvent, create a mouse-onlykCGEventTapOptionListenOnlysession tap, observe whether a prompt appears or the tap returns null.Related: #182, #183, #236.