diff options
author | S. Christoffer Eliesen <christoffer@eliesen.no> | 2015-10-27 23:19:55 +0100 |
---|---|---|
committer | S. Christoffer Eliesen <christoffer@eliesen.no> | 2015-10-27 23:22:57 +0100 |
commit | fabcf7c67820a50b28a5821320b1d30f61046f20 (patch) | |
tree | c7a80c623903cc1155948ee9f4ad571e82fdb299 /sway | |
parent | 6cd106d23c73c1f5c5f87d4c024400cfd5edc93f (diff) |
handlers: Pass workspace to workspace_switch, not output.
Diffstat (limited to 'sway')
-rw-r--r-- | sway/handlers.c | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/sway/handlers.c b/sway/handlers.c index c777e692..1c5abca6 100644 --- a/sway/handlers.c +++ b/sway/handlers.c @@ -369,25 +369,25 @@ static bool handle_pointer_motion(wlc_handle handle, uint32_t time, const struct swayc_t *output = swayc_active_output(), *adjacent = NULL; if (origin->x == 0) { // Left edge if ((adjacent = swayc_adjacent_output(output, MOVE_LEFT))) { - if (workspace_switch(adjacent)) { + if (workspace_switch(swayc_active_workspace_for(adjacent))) { new_origin.x = adjacent->width; } } } else if ((double)origin->x == output->width) { // Right edge if ((adjacent = swayc_adjacent_output(output, MOVE_RIGHT))) { - if (workspace_switch(adjacent)) { + if (workspace_switch(swayc_active_workspace_for(adjacent))) { new_origin.x = 0; } } } else if (origin->y == 0) { // Top edge if ((adjacent = swayc_adjacent_output(output, MOVE_UP))) { - if (workspace_switch(adjacent)) { + if (workspace_switch(swayc_active_workspace_for(adjacent))) { new_origin.y = adjacent->height; } } } else if ((double)origin->y == output->height) { // Bottom edge if ((adjacent = swayc_adjacent_output(output, MOVE_DOWN))) { - if (workspace_switch(adjacent)) { + if (workspace_switch(swayc_active_workspace_for(adjacent))) { new_origin.y = 0; } } |