aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDaniel Eklöf <daniel@ekloef.se>2019-11-30 11:43:06 +0000
committerDaniel Eklöf <daniel@ekloef.se>2019-11-30 11:43:06 +0000
commit8f8ef5df0e7de8b8e8c8db3688a2ab8428fdce2a (patch)
tree25f00e8a7fcdd3cc629c94aa46ecb1cd5e6509b3
parentfont: cache_size -> glyph_cache_size (diff)
term: define xcursor strings as global variables
-rw-r--r--terminal.c10
1 files changed, 7 insertions, 3 deletions
diff --git a/terminal.c b/terminal.c
index 53034dea..5111cc95 100644
--- a/terminal.c
+++ b/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);
}