diff options
author | Drew DeVault <sir@cmpwn.com> | 2017-09-05 20:55:27 +0900 |
---|---|---|
committer | GitHub <noreply@github.com> | 2017-09-05 20:55:27 +0900 |
commit | c5a2014a2ff3e22086c0d911f3bf771c5d5fb112 (patch) | |
tree | 905cc9e62ed24dbc2675097357ee44cf99eb550d /examples | |
parent | 6089967e070f382ca33854c8dd9560a9b6c4af6f (diff) | |
parent | 6904ed8bd95b3c6c9454086db0f5734cfff66ff3 (diff) |
Merge pull request #133 from acrisci/feature/wlr-cursor-layout-changes
wlr_cursor: automatically handle layout changes
Diffstat (limited to 'examples')
-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) { |