aboutsummaryrefslogtreecommitdiff
path: root/rootston/output.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/output.c
parente81e99d16d31765b51fcca31d5ffffd5087febfa (diff)
Implement wlr_cursor in rootston
Diffstat (limited to 'rootston/output.c')
-rw-r--r--rootston/output.c9
1 files changed, 4 insertions, 5 deletions
diff --git a/rootston/output.c b/rootston/output.c
index 481832cf..0f015fb6 100644
--- a/rootston/output.c
+++ b/rootston/output.c
@@ -73,6 +73,7 @@ static void output_frame_notify(struct wl_listener *listener, void *data) {
void output_add_notify(struct wl_listener *listener, void *data) {
struct wlr_output *wlr_output = data;
struct roots_desktop *desktop = wl_container_of(listener, desktop, output_add);
+ struct roots_input *input = desktop->server->input;
struct roots_config *config = desktop->config;
wlr_log(L_DEBUG, "Output '%s' added", wlr_output->name);
@@ -101,10 +102,9 @@ void output_add_notify(struct wl_listener *listener, void *data) {
wlr_output_layout_add_auto(desktop->layout, wlr_output);
}
- /* TODO: cursor
- example_config_configure_cursor(sample->config, sample->cursor,
- sample->compositor);
+ cursor_load_config(config, input->cursor, input, desktop);
+ struct wlr_xcursor_image *image = input->xcursor->images[0];
// TODO the cursor must be set depending on which surface it is displayed
// over which should happen in the compositor.
if (!wlr_output_set_cursor(wlr_output, image->buffer,
@@ -113,8 +113,7 @@ void output_add_notify(struct wl_listener *listener, void *data) {
return;
}
- wlr_cursor_warp(sample->cursor, NULL, sample->cursor->x, sample->cursor->y);
- */
+ wlr_cursor_warp(input->cursor, NULL, input->cursor->x, input->cursor->y);
}
void output_remove_notify(struct wl_listener *listener, void *data) {