aboutsummaryrefslogtreecommitdiff
path: root/rootston/input.c
diff options
context:
space:
mode:
authorDrew DeVault <sir@cmpwn.com>2017-09-23 14:53:15 -0400
committerDrew DeVault <sir@cmpwn.com>2017-09-23 14:53:15 -0400
commit57c50c78f05c25dfb82d0ef69264fca00e4b3e04 (patch)
tree164928df56032decb1ee5bd5af1bc4cc898e29b6 /rootston/input.c
parente81e99d16d31765b51fcca31d5ffffd5087febfa (diff)
Implement wlr_cursor in rootston
Diffstat (limited to 'rootston/input.c')
-rw-r--r--rootston/input.c8
1 files changed, 6 insertions, 2 deletions
diff --git a/rootston/input.c b/rootston/input.c
index d551715b..9ad20b58 100644
--- a/rootston/input.c
+++ b/rootston/input.c
@@ -75,12 +75,12 @@ struct roots_input *input_create(struct roots_server *server,
assert(input);
input->config = config;
- input->cursor = wlr_cursor_create();
+ input->server = server;
struct wlr_xcursor_theme *theme;
assert(theme = wlr_xcursor_theme_load("default", 16));
assert(input->xcursor = wlr_xcursor_theme_get_cursor(theme, "left_ptr"));
- wlr_cursor_set_xcursor(input->cursor, input->xcursor);
+
assert(input->wl_seat = wlr_seat_create(server->wl_display, "seat0"));
wl_list_init(&input->keyboards);
@@ -98,6 +98,10 @@ struct roots_input *input_create(struct roots_server *server,
wl_signal_add(&server->backend->events.input_remove,
&input->input_remove);
+ input->cursor = wlr_cursor_create();
+ cursor_initialize(input);
+ wlr_cursor_set_xcursor(input->cursor, input->xcursor);
+
return input;
}