Skip to content

Improve the hover rect#116

Merged
pragmatrix merged 3 commits intomasterfrom
keyboard-and-hover-rect
Apr 15, 2026
Merged

Improve the hover rect#116
pragmatrix merged 3 commits intomasterfrom
keyboard-and-hover-rect

Conversation

@pragmatrix
Copy link
Copy Markdown
Owner

@pragmatrix pragmatrix commented Apr 15, 2026

  • Disable when the a keypress was detected, enable when the mouse was moved.
  • Don't move it anymore.
  • Hide mouse pointer, too.

Copy link
Copy Markdown
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

This PR refines “pointer feedback” behavior (hover rect + cursor visibility) so it can be disabled on keyboard interaction and re-enabled based on subsequent pointer activity, while also simplifying hover-rect motion behavior.

Changes:

  • Add a window API wrapper to toggle cursor visibility and cache cursor-visible state in Desktop.
  • Add cursor “velocity” detection using recent input history to decide when to re-enable pointer feedback.
  • Simplify hover-rect state by removing rect animation (rect is now updated directly while alpha remains animated).

Reviewed changes

Copilot reviewed 7 out of 7 changed files in this pull request and generated 1 comment.

Show a summary per file
File Description
shell/src/shell_window.rs Adds set_cursor_visible wrapper for window cursor visibility control.
input/src/event.rs Adds cursor_has_velocity() helper based on event history.
desktop/src/projects/project_presenter.rs Removes hover-rect animation; keeps alpha animation and applies rect directly.
desktop/src/event_router.rs Exposes keyboard_focus_change() to avoid re-querying focus state.
desktop/src/desktop_system.rs Introduces pointer_feedback_enabled and logic to disable/reenable hover/cursor feedback.
desktop/src/desktop.rs Caches and applies cursor visibility changes to the shell window.
.github/copilot-instructions.md Adds guidance about shared state for affordances and caching window state requests.

Comment thread desktop/src/desktop_system.rs
@pragmatrix pragmatrix merged commit 45a01f5 into master Apr 15, 2026
5 of 8 checks passed
@pragmatrix pragmatrix deleted the keyboard-and-hover-rect branch April 15, 2026 07:30
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants