GRI-2112: hide the mouse pointer when it is not moving #259
No reviewers
Labels
No labels
Area/Backend
Area/Database
Area/Docs
Area/Frontend
Area/Infra
Area/Security
Area/Tests
Area/Tooling
Compat/Breaking
Kind/Bug
Kind/Documentation
Kind/Enhancement
Kind/Feature
Kind/Security
Kind/Testing
Lang/Python
Lang/Rust
Lang/Shell
Lang/SQL
Lang/TypeScript
Priority
Critical
Priority
High
Priority
Low
Priority
Medium
Reviewed
Confirmed
Reviewed
Duplicate
Reviewed
Invalid
Reviewed
Won't Fix
Routing
Auto
Routing
Hold
Routing
Human
Status
Abandoned
Status
Blocked
Status
Need More Info
No milestone
No project
No assignees
2 participants
Notifications
Due date
No due date set.
Dependencies
No dependencies set
Reference
Grimoirix/grimoire-of-digital-signage!259
Loading…
Reference in a new issue
No description provided.
Delete branch "fix/GRI-2112-hide-idle-cursor"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Summary
[display] hide_cursor_after_secsof no movement (default 3 s;GRIMOIRIX_SIGNAGE_HIDE_CURSOR_AFTER_SECSoverrides;0means never — GRI-1884, no hard-coded value).gdk::Window(image,gtksinkvideo,WebKit) are blanked together, so a web page cannot keep showing its own cursor under the player.gdk::Cursor::for_display(.., BlankCursor)), nounclutteror extra package.client::cursor_idle::CursorIdle) is pure logic with no GTK dependency, so it is unit-tested without a display;client::renderer::cursor::CursorControlleris the GTK/GDK wiring around it, tested underxvfb-run(gtk-rendererfeature).plan/operations/deployment.md.Test plan
cursor_idle::tests::*— pure idle-timer decision: fresh/visible, idle past the wait/hidden, movement resets it,0never hides. No display needed.config::tests::hide_cursor_after_secs_*— default, env override, file read, bad value refused.renderer::cursor::tests::the_idle_timer_hides_and_shows_the_cursor_and_respects_never(run underxvfb-run,gtk-rendererfeature) — the "Done when" scenario against a realgdk::Window: move → visible, wait → hidden (blank cursor), move → visible again;hide_after_secs = 0never hides regardless of how long it sits idle.Verified locally:
SIGNAGE_TEST_DATABASE_URL=... ./scripts/local-gates.sh --rust-only— every gate passed (default features, nogtk-renderer— matches CI). Additionally, by hand:xvfb-run -a cargo test -p client --features gtk-renderer— all 95 lib tests + integration tests pass, andcargo build -p client --features gtk-renderer --bin grimoirix-signage-clientbuilds clean.Correct and configurable (env > [display] > default 3, 0 = never). Non-blocking: watch_cursor runs before the window is shown, so gtksink/WebKit child gdk windows that are not realized yet are not in the list; GDK3 children with no cursor inherit the toplevel's, so it still works unless WebKit sets its own cursor. Worth one check on a real kiosk with a web item.
Approved. CI is green on
2ae65e51.What I checked:
Window::build()callsshow_all()beforewatch_cursor, so the toplevel and the stack children are realized andwidget.window()returns agdk::Window. The list of windows is not empty.0means never. This follows GRI-1884.gdk::Window.One thing to watch, not a blocker: WebKit sets its own cursor on its window when the pointer is over a link or text. If a page changes the cursor while the pointer is hidden and not moving, the pointer can come back until the next tick that is not a no-op.
tick()returns early oncehiddenis true, so it will not hide it again until there is movement. If you see that on a real screen, re-applying the blank cursor intick()while hidden is the fix.I merge it after #251, #256, #257 and #258, one per CI cycle.
New commits pushed, approval review dismissed automatically according to repository settings