From eff8481cdc6c37407faaa3167ea6f6897b12f544 Mon Sep 17 00:00:00 2001 From: Daniel Eklöf Date: Tue, 2 Feb 2021 09:52:22 +0100 Subject: selection: remove selection_enabled() MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Its name did not reflect its semantics. Since it was only used in a single place, “inline” it there, and get rid of it. --- terminal.c | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) (limited to 'terminal.c') diff --git a/terminal.c b/terminal.c index 7b0ba599..701313cc 100644 --- a/terminal.c +++ b/terminal.c @@ -2570,7 +2570,10 @@ term_xcursor_update_for_seat(struct terminal *term, struct seat *seat) const char *xcursor = seat->pointer.hidden ? XCURSOR_HIDDEN : term->is_searching ? XCURSOR_LEFT_PTR - : selection_enabled(term, seat) ? XCURSOR_TEXT + : (seat->mouse.col >= 0 && + seat->mouse.row >= 0 && + term_mouse_grabbed(term, seat)) ? XCURSOR_TEXT + : term->is_searching ? XCURSOR_TEXT : XCURSOR_LEFT_PTR; render_xcursor_set(seat, term, xcursor); -- cgit v1.3