diff options
Diffstat (limited to 'terminal.c')
| -rw-r--r-- | terminal.c | 18 |
1 files changed, 5 insertions, 13 deletions
@@ -1433,19 +1433,11 @@ term_mouse_motion(struct terminal *term, int button, int row, int col, void term_xcursor_update(struct terminal *term) { - const bool no_mouse_tracking = term->mouse_tracking == MOUSE_NONE; - const bool is_searching = term->is_searching; - const bool is_focused = term->wl->focused == term; - const bool forced_selection = is_focused && term->wl->kbd.shift; - - term->xcursor = (no_mouse_tracking || forced_selection) && !is_searching - ? "text" : "left_ptr"; - - LOG_DBG( - "setting xcursor to '%s' for term=%p " - "(is_focused=%d, tracking=%d, shift=%d, searching=%d)", - term->xcursor, term, is_focused, term->mouse_tracking, - term->wl->kbd.shift, is_searching); + term->xcursor = + term->is_searching ? "left_ptr" : + term->mouse_tracking == MOUSE_NONE ? "text" : + term->wl->focused == term && term->wl->kbd.shift ? "text" : + "hand2"; wayl_cursor_set(term->wl, term); } |
