mirror of
https://codeberg.org/dnkl/foot.git
synced 2026-02-05 04:06:08 -05:00
term: define xcursor strings as global variables
This commit is contained in:
parent
10f563dc6b
commit
8f8ef5df0e
1 changed files with 7 additions and 3 deletions
10
terminal.c
10
terminal.c
|
|
@ -29,6 +29,10 @@
|
|||
#define min(x, y) ((x) < (y) ? (x) : (y))
|
||||
#define max(x, y) ((x) > (y) ? (x) : (y))
|
||||
|
||||
static const char *const XCURSOR_LEFT_PTR = "left_ptr";
|
||||
static const char *const XCURSOR_TEXT = "text";
|
||||
static const char *const XCURSOR_HAND2 = "hand2";
|
||||
|
||||
bool
|
||||
term_to_slave(struct terminal *term, const void *_data, size_t len)
|
||||
{
|
||||
|
|
@ -1435,9 +1439,9 @@ void
|
|||
term_xcursor_update(struct terminal *term)
|
||||
{
|
||||
term->xcursor =
|
||||
term->is_searching ? "left_ptr" :
|
||||
selection_enabled(term) ? "text" :
|
||||
"hand2";
|
||||
term->is_searching ? XCURSOR_LEFT_PTR :
|
||||
selection_enabled(term) ? XCURSOR_TEXT :
|
||||
XCURSOR_HAND2;
|
||||
|
||||
wayl_cursor_set(term->wl, term);
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue