aboutsummaryrefslogtreecommitdiffstats
path: root/sway/input/cursor.c
diff options
context:
space:
mode:
authorLibravatar Scott Leggett <scott@sl.id.au>2018-06-06 20:45:02 +1000
committerLibravatar Scott Leggett <scott@sl.id.au>2018-06-06 20:45:02 +1000
commit609c420501cba7fe1d32d50a5b5ed79ba7d8a062 (patch)
tree19f01bff326a249307b85840fa839284aabd9e66 /sway/input/cursor.c
parentMerge pull request #2107 from tobiasblass/remove_suspicious_return (diff)
downloadsway-609c420501cba7fe1d32d50a5b5ed79ba7d8a062.tar.gz
sway-609c420501cba7fe1d32d50a5b5ed79ba7d8a062.tar.zst
sway-609c420501cba7fe1d32d50a5b5ed79ba7d8a062.zip
Initialise previous cursor position.
Fix the problem with focus jumping to the container under the cursor when first starting sway.
Diffstat (limited to 'sway/input/cursor.c')
-rw-r--r--sway/input/cursor.c3
1 files changed, 3 insertions, 0 deletions
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) {
480 return NULL; 480 return NULL;
481 } 481 }
482 482
483 cursor->previous.x = wlr_cursor->x;
484 cursor->previous.y = wlr_cursor->y;
485
483 cursor->seat = seat; 486 cursor->seat = seat;
484 wlr_cursor_attach_output_layout(wlr_cursor, 487 wlr_cursor_attach_output_layout(wlr_cursor,
485 root_container.sway_root->output_layout); 488 root_container.sway_root->output_layout);