mirror of
https://codeberg.org/dnkl/foot.git
synced 2026-02-12 04:27:51 -05:00
config: add 'hide-when-typing'
When enabled, the mouse cursor is hidden when the user types in the terminal. It is un-hidden when the user moves the mouse, or when the window loses keyboard focus.
This commit is contained in:
parent
b00dfcf7b6
commit
d4ee9be4d7
11 changed files with 57 additions and 16 deletions
9
render.c
9
render.c
|
|
@ -2105,6 +2105,15 @@ render_xcursor_update(struct seat *seat)
|
|||
if (!seat->mouse_focus)
|
||||
return;
|
||||
|
||||
assert(seat->pointer.xcursor != NULL);
|
||||
|
||||
if (seat->pointer.xcursor == XCURSOR_HIDDEN) {
|
||||
/* Hide cursor */
|
||||
wl_surface_attach(seat->pointer.surface, NULL, 0, 0);
|
||||
wl_surface_commit(seat->pointer.surface);
|
||||
return;
|
||||
}
|
||||
|
||||
seat->pointer.cursor = wl_cursor_theme_get_cursor(
|
||||
seat->pointer.theme, seat->pointer.xcursor);
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue