aboutsummaryrefslogtreecommitdiff
path: root/rootston/seat.c
diff options
context:
space:
mode:
authoremersion <contact@emersion.fr>2017-12-14 11:20:38 +0100
committeremersion <contact@emersion.fr>2017-12-14 11:20:38 +0100
commit6ef021976384163cf9fde90d635a2e22479d107a (patch)
tree2c426fa4ce6b30b29bed1fb567ffc74a7d60009f /rootston/seat.c
parent4da404818957d37fba4c0d6346a5f2f8a8e6db38 (diff)
parenta9fb071d49b244b72846b384a9e2ef2d9b03a05f (diff)
Merge branch 'master' into xwm-selection
Diffstat (limited to 'rootston/seat.c')
-rw-r--r--rootston/seat.c19
1 files changed, 12 insertions, 7 deletions
diff --git a/rootston/seat.c b/rootston/seat.c
index 1fa09ad6..8a581157 100644
--- a/rootston/seat.c
+++ b/rootston/seat.c
@@ -442,14 +442,19 @@ void roots_seat_configure_xcursor(struct roots_seat *seat) {
roots_config_get_cursor(seat->input->config, seat->seat->name);
if (cc != NULL) {
cursor_theme = cc->theme;
+ if (cc->default_image != NULL) {
+ seat->cursor->default_xcursor = cc->default_image;
+ }
}
- seat->cursor->xcursor_manager =
- wlr_xcursor_manager_create(cursor_theme, ROOTS_XCURSOR_SIZE);
- if (seat->cursor->xcursor_manager == NULL) {
- wlr_log(L_ERROR, "Cannot create XCursor manager for theme %s",
- cursor_theme);
- return;
+ if (!seat->cursor->xcursor_manager) {
+ seat->cursor->xcursor_manager =
+ wlr_xcursor_manager_create(cursor_theme, ROOTS_XCURSOR_SIZE);
+ if (seat->cursor->xcursor_manager == NULL) {
+ wlr_log(L_ERROR, "Cannot create XCursor manager for theme %s",
+ cursor_theme);
+ return;
+ }
}
struct roots_output *output;
@@ -463,7 +468,7 @@ void roots_seat_configure_xcursor(struct roots_seat *seat) {
}
wlr_xcursor_manager_set_cursor_image(seat->cursor->xcursor_manager,
- ROOTS_XCURSOR_DEFAULT, seat->cursor->cursor);
+ seat->cursor->default_xcursor, seat->cursor->cursor);
wlr_cursor_warp(seat->cursor->cursor, NULL, seat->cursor->cursor->x,
seat->cursor->cursor->y);
}