diff options
| author | Daniel Eklöf <daniel@ekloef.se> | 2020-07-31 15:09:06 +0000 |
|---|---|---|
| committer | Daniel Eklöf <daniel@ekloef.se> | 2020-07-31 15:09:06 +0000 |
| commit | d4ee9be4d767ff4927c9e322bdbf958841dc091d (patch) | |
| tree | ab8adafe11e3bae878f38e9559b1abbf937f48a1 /render.c | |
| parent | config: configuration errors are no longer fatal (diff) | |
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.
Diffstat (limited to 'render.c')
| -rw-r--r-- | render.c | 9 |
1 files changed, 9 insertions, 0 deletions
@@ -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); |
