From 6904ed8bd95b3c6c9454086db0f5734cfff66ff3 Mon Sep 17 00:00:00 2001 From: Tony Crisci Date: Tue, 5 Sep 2017 07:52:17 -0400 Subject: [PATCH] bugfix: warp cursor to current position on output add --- examples/pointer.c | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/examples/pointer.c b/examples/pointer.c index fe0e2cee..1eb0f923 100644 --- a/examples/pointer.c +++ b/examples/pointer.c @@ -151,15 +151,15 @@ static void handle_output_add(struct output_state *ostate) { configure_devices(sample); - // TODO move to wlr_cursor + // 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, image->width, image->width, image->height)) { wlr_log(L_DEBUG, "Failed to set hardware cursor"); return; } - if (!wlr_output_move_cursor(wlr_output, 0, 0)) { - wlr_log(L_DEBUG, "Failed to move hardware cursor"); - } + + wlr_cursor_warp(sample->cursor, NULL, sample->cursor->x, sample->cursor->y); } static void handle_output_remove(struct output_state *ostate) {