term: use 'left_ptr' instead of 'hand2' as cursor when client is mouse grabbing

This commit is contained in:
Daniel Eklöf 2020-06-29 21:51:53 +02:00
parent 32e84fbc54
commit 2ea32398c3
No known key found for this signature in database
GPG key ID: 5BBD4992C116573F
2 changed files with 5 additions and 3 deletions

View file

@ -36,6 +36,8 @@
debug logging has been enabled. debug logging has been enabled.
* OSC 4 (_Set Color_) now updates already rendered cells, excluding * OSC 4 (_Set Color_) now updates already rendered cells, excluding
scrollback. scrollback.
* Mouse cursor from `hand2` to `left_ptr` when client is capturing the
mouse.
### Deprecated ### Deprecated

View file

@ -36,7 +36,7 @@
static const char *const XCURSOR_LEFT_PTR = "left_ptr"; static const char *const XCURSOR_LEFT_PTR = "left_ptr";
static const char *const XCURSOR_TEXT = "text"; static const char *const XCURSOR_TEXT = "text";
static const char *const XCURSOR_HAND2 = "hand2"; //static const char *const XCURSOR_HAND2 = "hand2";
bool bool
term_to_slave(struct terminal *term, const void *_data, size_t len) term_to_slave(struct terminal *term, const void *_data, size_t len)
@ -2204,9 +2204,9 @@ void
term_xcursor_update(struct terminal *term) term_xcursor_update(struct terminal *term)
{ {
term->xcursor = term->xcursor =
term->is_searching ? XCURSOR_LEFT_PTR : term->is_searching ? XCURSOR_LEFT_PTR : /* TODO: something different? */
selection_enabled(term) ? XCURSOR_TEXT : selection_enabled(term) ? XCURSOR_TEXT :
XCURSOR_HAND2; XCURSOR_LEFT_PTR;
render_xcursor_set(term); render_xcursor_set(term);
} }