aboutsummaryrefslogtreecommitdiff
path: root/rootston/input.c
diff options
context:
space:
mode:
authorDrew DeVault <sir@cmpwn.com>2017-09-30 09:08:35 -0400
committerGitHub <noreply@github.com>2017-09-30 09:08:35 -0400
commitedf5e6211d07d7b8f35e8dabd4d97303743e3c7c (patch)
treefb8b62372425a118cbe9e1ea5b1a3ac51481bc37 /rootston/input.c
parent0c48ef5ad860dfdd041b9ce5d300c6fa85151e3f (diff)
parent23e741144289a313079309a24c1516a5504a5c63 (diff)
Merge pull request #176 from acrisci/bug/init-desktop-before-input
rootston: create desktop before input
Diffstat (limited to 'rootston/input.c')
-rw-r--r--rootston/input.c7
1 files changed, 7 insertions, 0 deletions
diff --git a/rootston/input.c b/rootston/input.c
index b4427212..9157ecc7 100644
--- a/rootston/input.c
+++ b/rootston/input.c
@@ -71,6 +71,8 @@ static void input_remove_notify(struct wl_listener *listener, void *data) {
struct roots_input *input_create(struct roots_server *server,
struct roots_config *config) {
wlr_log(L_DEBUG, "Initializing roots input");
+ assert(server->desktop);
+
struct roots_input *input = calloc(1, sizeof(struct roots_input));
assert(input);
@@ -104,6 +106,11 @@ struct roots_input *input_create(struct roots_server *server,
cursor_initialize(input);
wlr_cursor_set_xcursor(input->cursor, input->xcursor);
+ wlr_cursor_attach_output_layout(input->cursor, server->desktop->layout);
+ wlr_cursor_map_to_region(input->cursor, config->cursor.mapped_box);
+ cursor_load_config(config, input->cursor,
+ input, server->desktop);
+
return input;
}