diff options
author | Tony Crisci <tony@dubstepdish.com> | 2017-09-05 07:52:17 -0400 |
---|---|---|
committer | Tony Crisci <tony@dubstepdish.com> | 2017-09-05 07:52:17 -0400 |
commit | 6904ed8bd95b3c6c9454086db0f5734cfff66ff3 (patch) | |
tree | 905cc9e62ed24dbc2675097357ee44cf99eb550d | |
parent | 57c18c38bbf07656b30dd5efa15319e4c92de256 (diff) |
bugfix: warp cursor to current position on output add
-rw-r--r-- | examples/pointer.c | 8 |
1 files 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) { |