-
-
Notifications
You must be signed in to change notification settings - Fork 109
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
Implement Cursor Hiding While Typing & Cursor Inactive Timeout (#284) #709
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.
Seems rather straightforward and simple. As long as it works for the people who want this functionality.
Implementing this approach would involve finding a suitable place in the codebase to handle the periodic checks, which I found challenging due to the existing event-driven architecture.
Sounds similar enough to the idle notifier code. That one's refreshed on every input event, but the cursor one could be refreshed on every pointer event instead.
This comment was marked as resolved.
This comment was marked as resolved.
I check cursor timeout in function |
OK. I resolved them all. |
I did some fixes, and I also had to reimplement the inactivity hiding as a timer after all, since otherwise it would fire late due to |
It worked perfectly! Thank you! |
Feels like this should be the case.
The previous way was prone to triggering late due to compositor idling and therefore never calling the check function.
Thanks |
This pull request addresses the discussion on #284 regarding cursor management in niri. Specifically, I have implemented the second solution: hiding the cursor while typing.
The implementation of cursor timeout (solution 1) would require active polling to check the remaining time, which is not straightforward given our current design where all cursor-related updates are triggered by events. Implementing this approach would involve finding a suitable place in the codebase to handle the periodic checks, which I found challenging due to the existing event-driven architecture.
In contrast, hiding the cursor while typing (solution 2) can be seamlessly integrated as it aligns with the existing event-driven model. This implementation is more straightforward and reduces potential complexity.
Please review the changes and let me know if any further adjustments are needed.