aboutsummaryrefslogtreecommitdiffstats
path: root/sway/commands/focus.c
diff options
context:
space:
mode:
authorLibravatar Ryan Dwyer <ryandwyer1@gmail.com>2018-10-24 18:43:32 +1000
committerLibravatar Ryan Dwyer <ryandwyer1@gmail.com>2018-10-24 18:43:32 +1000
commit3c7fd145d5223b06c05660d05f51b91dc41c81cf (patch)
tree5b2e4b6f018d5acbbfbf09f4b3318bbb15dbcf8b /sway/commands/focus.c
parentMerge pull request #2933 from Snaipe/xwayland-window-properties (diff)
downloadsway-3c7fd145d5223b06c05660d05f51b91dc41c81cf.tar.gz
sway-3c7fd145d5223b06c05660d05f51b91dc41c81cf.tar.zst
sway-3c7fd145d5223b06c05660d05f51b91dc41c81cf.zip
Rebase the cursor after focusing in a direction
Prior to this patch, creating a tabbed container with two views, switching tab and then scrolling without motion would cause the scroll events to be sent to the old focus. To fix this, rebasing the cursor is needed after changing focus.
Diffstat (limited to 'sway/commands/focus.c')
-rw-r--r--sway/commands/focus.c1
1 files changed, 1 insertions, 0 deletions
diff --git a/sway/commands/focus.c b/sway/commands/focus.c
index 7dfa8814..81af8e0f 100644
--- a/sway/commands/focus.c
+++ b/sway/commands/focus.c
@@ -294,6 +294,7 @@ struct cmd_results *cmd_focus(int argc, char **argv) {
294 if (next_focus) { 294 if (next_focus) {
295 seat_set_focus(seat, next_focus); 295 seat_set_focus(seat, next_focus);
296 seat_consider_warp_to_focus(seat); 296 seat_consider_warp_to_focus(seat);
297 cursor_rebase(seat->cursor);
297 } 298 }
298 299
299 return cmd_results_new(CMD_SUCCESS, NULL, NULL); 300 return cmd_results_new(CMD_SUCCESS, NULL, NULL);