From 609c420501cba7fe1d32d50a5b5ed79ba7d8a062 Mon Sep 17 00:00:00 2001 From: Scott Leggett Date: Wed, 6 Jun 2018 20:45:02 +1000 Subject: Initialise previous cursor position. Fix the problem with focus jumping to the container under the cursor when first starting sway. --- sway/input/cursor.c | 3 +++ 1 file changed, 3 insertions(+) diff --git a/sway/input/cursor.c b/sway/input/cursor.c index d6e17ae1..4100479c 100644 --- a/sway/input/cursor.c +++ b/sway/input/cursor.c @@ -480,6 +480,9 @@ struct sway_cursor *sway_cursor_create(struct sway_seat *seat) { return NULL; } + cursor->previous.x = wlr_cursor->x; + cursor->previous.y = wlr_cursor->y; + cursor->seat = seat; wlr_cursor_attach_output_layout(wlr_cursor, root_container.sway_root->output_layout); -- cgit v1.2.3-54-g00ecf