diff options
author | Jesse Luehrs <doy@tozt.net> | 2014-04-21 00:05:05 -0400 |
---|---|---|
committer | Jesse Luehrs <doy@tozt.net> | 2014-04-21 00:05:05 -0400 |
commit | eeae1cc578e709742ffd9c7563ce48220d97c0da (patch) | |
tree | aa0088f9dfa8560169ce63327fbfe03aded2c1ef /src/config.c | |
parent | 52ea09e49afd5965fc79d78317a481a29d2c0ff5 (diff) | |
download | runes-eeae1cc578e709742ffd9c7563ce48220d97c0da.tar.gz runes-eeae1cc578e709742ffd9c7563ce48220d97c0da.zip |
allow configuring the color of the mouse cursor
Diffstat (limited to 'src/config.c')
-rw-r--r-- | src/config.c | 10 |
1 files changed, 10 insertions, 0 deletions
diff --git a/src/config.c b/src/config.c index 6bcf824..7353ce7 100644 --- a/src/config.c +++ b/src/config.c @@ -30,6 +30,8 @@ static void runes_config_set_defaults(RunesTerm *t) t->bold_is_bold = 1; t->audible_bell = 1; + t->mousecursorcolor = cairo_pattern_create_rgb(1.0, 1.0, 1.0); + t->fgdefault = cairo_pattern_create_rgb(0.827, 0.827, 0.827); t->bgdefault = cairo_pattern_create_rgb(0.0, 0.0, 0.0); @@ -195,6 +197,14 @@ static void runes_config_set(RunesTerm *t, char *key, char *val) t->fgdefault = newcolor; } } + else if (!strcmp(key, "mousecursorcolor")) { + cairo_pattern_t *newcolor; + newcolor = runes_config_parse_color(val); + if (newcolor) { + cairo_pattern_destroy(t->mousecursorcolor); + t->mousecursorcolor = newcolor; + } + } else if (!strncmp(key, "color", 5) && strlen(key) == 6 && key[5] >= '0' && key[5] <= '7') { cairo_pattern_t *newcolor; |