diff options
author | Drew DeVault <sir@cmpwn.com> | 2019-02-12 23:22:33 +0100 |
---|---|---|
committer | GitHub <noreply@github.com> | 2019-02-12 23:22:33 +0100 |
commit | c44794bedcad90991b1b665ec5253175e3ef437f (patch) | |
tree | 241c7e66f4fcb4d48377ee0a396039a70dacab34 /sway/input | |
parent | f390a6ef8c8956c85409f95b5c70d8b9f0a8f55c (diff) | |
parent | 97c89b24b8e4a8e091f6974333457deb73b7800f (diff) |
Merge pull request #3665 from emersion/layer-map-rebase
Rebase cursor when a layer surface maps
Diffstat (limited to 'sway/input')
-rw-r--r-- | sway/input/cursor.c | 13 |
1 files changed, 13 insertions, 0 deletions
diff --git a/sway/input/cursor.c b/sway/input/cursor.c index 1bf548db..263b6758 100644 --- a/sway/input/cursor.c +++ b/sway/input/cursor.c @@ -283,6 +283,19 @@ void cursor_rebase(struct sway_cursor *cursor) { cursor_do_rebase(cursor, time_msec, cursor->previous.node, surface, sx, sy); } +void cursor_rebase_all(void) { + if (!root->outputs->length) { + return; + } + + struct sway_seat *seat; + wl_list_for_each(seat, &server.input->seats, link) { + if (!seat_doing_seatop(seat)) { + cursor_rebase(seat->cursor); + } + } +} + static int hide_notify(void *data) { struct sway_cursor *cursor = data; wlr_cursor_set_image(cursor->cursor, NULL, 0, 0, 0, 0, 0, 0); |