diff options
author | emersion <contact@emersion.fr> | 2017-11-18 09:47:53 +0100 |
---|---|---|
committer | emersion <contact@emersion.fr> | 2017-11-18 09:47:53 +0100 |
commit | cd566ccd8e1c41af6b1d5f03fabdbdeaca2625ab (patch) | |
tree | 935aa837745796408421b7f44bf885e5683371cf /rootston | |
parent | bf5640db128b930b38ebca2b1d8a79e028ad9f39 (diff) |
Add cursor theme to rootston config
Diffstat (limited to 'rootston')
-rw-r--r-- | rootston/config.c | 3 | ||||
-rw-r--r-- | rootston/desktop.c | 5 | ||||
-rw-r--r-- | rootston/rootston.ini.example | 2 |
3 files changed, 8 insertions, 2 deletions
diff --git a/rootston/config.c b/rootston/config.c index 727b52d0..638d6e73 100644 --- a/rootston/config.c +++ b/rootston/config.c @@ -276,6 +276,9 @@ static int config_ini_handler(void *user, const char *section, const char *name, } else if (strcmp(name, "geometry") == 0) { free(config->cursor.mapped_box); config->cursor.mapped_box = parse_geometry(value); + } else if (strcmp(name, "theme") == 0) { + free(config->cursor.theme); + config->cursor.theme = strdup(value); } else { wlr_log(L_ERROR, "got unknown cursor config: %s", name); } diff --git a/rootston/desktop.c b/rootston/desktop.c index 1695d007..a2af5e95 100644 --- a/rootston/desktop.c +++ b/rootston/desktop.c @@ -338,10 +338,11 @@ struct roots_desktop *desktop_create(struct roots_server *server, desktop->server = server; desktop->config = config; - desktop->xcursor_manager = wlr_xcursor_manager_create(NULL, + desktop->xcursor_manager = wlr_xcursor_manager_create(config->cursor.theme, ROOTS_XCURSOR_SIZE); if (desktop->xcursor_manager == NULL) { - wlr_log(L_ERROR, "Cannot create XCursor manager"); + wlr_log(L_ERROR, "Cannot create XCursor manager for theme %s", + config->cursor.theme); wlr_list_free(desktop->views); free(desktop); return NULL; diff --git a/rootston/rootston.ini.example b/rootston/rootston.ini.example index c33b0f04..17467100 100644 --- a/rootston/rootston.ini.example +++ b/rootston/rootston.ini.example @@ -21,6 +21,8 @@ rotate = 90 map-to-output = VGA-1 # Restrict cursor movements to concrete rectangle geometry = 2500x800 +# Load a custom XCursor theme +theme = default # Single device configuration. String after semicolon must match device's name. [device:PixArt Dell MS116 USB Optical Mouse] |