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 | |
parent | Merge pull request #208 from minus7/ipc_subscribe (diff) | |
download | sway-fabcf7c67820a50b28a5821320b1d30f61046f20.tar.gz sway-fabcf7c67820a50b28a5821320b1d30f61046f20.tar.zst sway-fabcf7c67820a50b28a5821320b1d30f61046f20.zip |
handlers: Pass workspace to workspace_switch, not output.
-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 | |||
369 | swayc_t *output = swayc_active_output(), *adjacent = NULL; | 369 | swayc_t *output = swayc_active_output(), *adjacent = NULL; |
370 | if (origin->x == 0) { // Left edge | 370 | if (origin->x == 0) { // Left edge |
371 | if ((adjacent = swayc_adjacent_output(output, MOVE_LEFT))) { | 371 | if ((adjacent = swayc_adjacent_output(output, MOVE_LEFT))) { |
372 | if (workspace_switch(adjacent)) { | 372 | if (workspace_switch(swayc_active_workspace_for(adjacent))) { |
373 | new_origin.x = adjacent->width; | 373 | new_origin.x = adjacent->width; |
374 | } | 374 | } |
375 | } | 375 | } |
376 | } else if ((double)origin->x == output->width) { // Right edge | 376 | } else if ((double)origin->x == output->width) { // Right edge |
377 | if ((adjacent = swayc_adjacent_output(output, MOVE_RIGHT))) { | 377 | if ((adjacent = swayc_adjacent_output(output, MOVE_RIGHT))) { |
378 | if (workspace_switch(adjacent)) { | 378 | if (workspace_switch(swayc_active_workspace_for(adjacent))) { |
379 | new_origin.x = 0; | 379 | new_origin.x = 0; |
380 | } | 380 | } |
381 | } | 381 | } |
382 | } else if (origin->y == 0) { // Top edge | 382 | } else if (origin->y == 0) { // Top edge |
383 | if ((adjacent = swayc_adjacent_output(output, MOVE_UP))) { | 383 | if ((adjacent = swayc_adjacent_output(output, MOVE_UP))) { |
384 | if (workspace_switch(adjacent)) { | 384 | if (workspace_switch(swayc_active_workspace_for(adjacent))) { |
385 | new_origin.y = adjacent->height; | 385 | new_origin.y = adjacent->height; |
386 | } | 386 | } |
387 | } | 387 | } |
388 | } else if ((double)origin->y == output->height) { // Bottom edge | 388 | } else if ((double)origin->y == output->height) { // Bottom edge |
389 | if ((adjacent = swayc_adjacent_output(output, MOVE_DOWN))) { | 389 | if ((adjacent = swayc_adjacent_output(output, MOVE_DOWN))) { |
390 | if (workspace_switch(adjacent)) { | 390 | if (workspace_switch(swayc_active_workspace_for(adjacent))) { |
391 | new_origin.y = 0; | 391 | new_origin.y = 0; |
392 | } | 392 | } |
393 | } | 393 | } |