term: xcursor: use selection_enabled()

Instead of duplicating the code from selection_enabled() that deals
with forced selection, just call selection_enabled().

This was previously not possible since selection_enabled() didn't
require keyboard_focus. Now it does.
This commit is contained in:
Daniel Eklöf 2019-11-30 12:01:40 +01:00
parent edb78575c7
commit c8d94931e6
No known key found for this signature in database
GPG key ID: 5BBD4992C116573F

View file

@ -1436,8 +1436,7 @@ term_xcursor_update(struct terminal *term)
{
term->xcursor =
term->is_searching ? "left_ptr" :
term->mouse_tracking == MOUSE_NONE ? "text" :
term->wl->focused == term && term->wl->kbd.shift ? "text" :
selection_enabled(term) ? "text" :
"hand2";
wayl_cursor_set(term->wl, term);