aboutsummaryrefslogtreecommitdiff
path: root/rootston/seat.c
diff options
context:
space:
mode:
authoremersion <contact@emersion.fr>2017-12-11 16:14:03 +0100
committeremersion <contact@emersion.fr>2017-12-11 16:14:03 +0100
commitc67a5824b8831b50e9f3b09cc182f496fb973321 (patch)
tree0a4f6090819e680bcd611388c8cbe867fbb4983a /rootston/seat.c
parent6001235b0465ba1961f8abd66a860bcf1f14fc22 (diff)
parent808ab5aa1bd990776ae30d5f9bb171ca7b42d6ef (diff)
Merge branch 'master' into display-destroy
Diffstat (limited to 'rootston/seat.c')
-rw-r--r--rootston/seat.c22
1 files changed, 14 insertions, 8 deletions
diff --git a/rootston/seat.c b/rootston/seat.c
index 737bbd67..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);
}
@@ -661,8 +666,9 @@ void roots_seat_begin_resize(struct roots_seat *seat, struct roots_view *view,
view_maximize(view, false);
wlr_seat_pointer_clear_focus(seat->seat);
+ const char *resize_name = wlr_xcursor_get_resize_name(edges);
wlr_xcursor_manager_set_cursor_image(seat->cursor->xcursor_manager,
- roots_xcursor_get_resize_name(edges), seat->cursor->cursor);
+ resize_name, seat->cursor->cursor);
}
void roots_seat_begin_rotate(struct roots_seat *seat, struct roots_view *view) {