aboutsummaryrefslogtreecommitdiff
path: root/rootston/input.c
diff options
context:
space:
mode:
Diffstat (limited to 'rootston/input.c')
-rw-r--r--rootston/input.c15
1 files changed, 8 insertions, 7 deletions
diff --git a/rootston/input.c b/rootston/input.c
index f424485e..a6792bdb 100644
--- a/rootston/input.c
+++ b/rootston/input.c
@@ -81,16 +81,17 @@ struct roots_input *input_create(struct roots_server *server,
input->config = config;
input->server = server;
- input->theme = wlr_xcursor_theme_load("default", 16);
- if (input->theme == NULL) {
+ input->xcursor_theme = wlr_xcursor_theme_load("default", 16);
+ if (input->xcursor_theme == NULL) {
wlr_log(L_ERROR, "Cannot load xcursor theme");
free(input);
return NULL;
}
- input->xcursor = wlr_xcursor_theme_get_cursor(input->theme, "left_ptr");
- if (input->xcursor == NULL) {
+
+ struct wlr_xcursor *xcursor = get_default_xcursor(input->xcursor_theme);
+ if (xcursor == NULL) {
wlr_log(L_ERROR, "Cannot load xcursor from theme");
- wlr_xcursor_theme_destroy(input->theme);
+ wlr_xcursor_theme_destroy(input->xcursor_theme);
free(input);
return NULL;
}
@@ -98,7 +99,7 @@ struct roots_input *input_create(struct roots_server *server,
input->wl_seat = wlr_seat_create(server->wl_display, "seat0");
if (input->wl_seat == NULL) {
wlr_log(L_ERROR, "Cannot create seat");
- wlr_xcursor_theme_destroy(input->theme);
+ wlr_xcursor_theme_destroy(input->xcursor_theme);
free(input);
return NULL;
}
@@ -117,7 +118,7 @@ struct roots_input *input_create(struct roots_server *server,
input->cursor = wlr_cursor_create();
cursor_initialize(input);
- wlr_cursor_set_xcursor(input->cursor, input->xcursor);
+ wlr_cursor_set_xcursor(input->cursor, xcursor);
wlr_cursor_attach_output_layout(input->cursor, server->desktop->layout);
wlr_cursor_map_to_region(input->cursor, config->cursor.mapped_box);