diff options
author | Drew DeVault <sir@cmpwn.com> | 2017-10-27 13:42:53 -0400 |
---|---|---|
committer | GitHub <noreply@github.com> | 2017-10-27 13:42:53 -0400 |
commit | 9f1ed70b81adc0680ba796a5545709036bc54408 (patch) | |
tree | da33a734e90c78467ed838506f86d392305d6500 /rootston/input.c | |
parent | 0572abbb252edfc27232c08893b7440561ca171d (diff) | |
parent | ec5beeb8b8eec615f74f640f84e8fa8e451ba3bb (diff) |
Merge pull request #344 from emersion/compositor-action-cursors
Set compositor cursor for move, resize and rotate
Diffstat (limited to 'rootston/input.c')
-rw-r--r-- | rootston/input.c | 15 |
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); |