aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--examples/pointer.c4
-rw-r--r--include/wlr/types/wlr_cursor.h2
-rw-r--r--rootston/input.c5
-rw-r--r--types/wlr_cursor.c5
4 files changed, 7 insertions, 9 deletions
diff --git a/examples/pointer.c b/examples/pointer.c
index 26d50b95..77f5192f 100644
--- a/examples/pointer.c
+++ b/examples/pointer.c
@@ -321,7 +321,9 @@ int main(int argc, char *argv[]) {
return 1;
}
- wlr_cursor_set_xcursor(state.cursor, state.xcursor);
+ struct wlr_xcursor_image *image = state.xcursor->images[0];
+ wlr_cursor_set_image(state.cursor, image->buffer, image->width,
+ image->width, image->height, image->hotspot_x, image->hotspot_y);
compositor_init(&compositor);
if (!wlr_backend_start(compositor.backend)) {
diff --git a/include/wlr/types/wlr_cursor.h b/include/wlr/types/wlr_cursor.h
index be4f322f..1aac2b94 100644
--- a/include/wlr/types/wlr_cursor.h
+++ b/include/wlr/types/wlr_cursor.h
@@ -36,8 +36,6 @@ struct wlr_cursor *wlr_cursor_create();
void wlr_cursor_destroy(struct wlr_cursor *cur);
-void wlr_cursor_set_xcursor(struct wlr_cursor *cur, struct wlr_xcursor *xcur);
-
/**
* Warp the cursor to the given x and y in layout coordinates. If x and y are
* out of the layout boundaries or constraints, no warp will happen.
diff --git a/rootston/input.c b/rootston/input.c
index a6792bdb..8109d2b6 100644
--- a/rootston/input.c
+++ b/rootston/input.c
@@ -118,7 +118,10 @@ struct roots_input *input_create(struct roots_server *server,
input->cursor = wlr_cursor_create();
cursor_initialize(input);
- wlr_cursor_set_xcursor(input->cursor, xcursor);
+
+ struct wlr_xcursor_image *image = xcursor->images[0];
+ wlr_cursor_set_image(input->cursor, image->buffer, image->width,
+ image->width, image->height, image->hotspot_x, image->hotspot_y);
wlr_cursor_attach_output_layout(input->cursor, server->desktop->layout);
wlr_cursor_map_to_region(input->cursor, config->cursor.mapped_box);
diff --git a/types/wlr_cursor.c b/types/wlr_cursor.c
index 76e20e9e..ece3d842 100644
--- a/types/wlr_cursor.c
+++ b/types/wlr_cursor.c
@@ -46,7 +46,6 @@ struct wlr_cursor_state {
struct wl_list devices; // wlr_cursor_device::link
struct wl_list output_cursors; // wlr_cursor_output_cursor::link
struct wlr_output_layout *layout;
- struct wlr_xcursor *xcursor;
struct wlr_output *mapped_output;
struct wlr_box *mapped_box;
@@ -123,10 +122,6 @@ void wlr_cursor_destroy(struct wlr_cursor *cur) {
free(cur);
}
-void wlr_cursor_set_xcursor(struct wlr_cursor *cur, struct wlr_xcursor *xcur) {
- cur->state->xcursor = xcur;
-}
-
static struct wlr_cursor_device *get_cursor_device(struct wlr_cursor *cur,
struct wlr_input_device *device) {
struct wlr_cursor_device *c_device, *ret = NULL;