diff options
Diffstat (limited to 'sway/tree/view.c')
-rw-r--r-- | sway/tree/view.c | 9 |
1 files changed, 8 insertions, 1 deletions
diff --git a/sway/tree/view.c b/sway/tree/view.c index 48bd7ac0..faaa53a1 100644 --- a/sway/tree/view.c +++ b/sway/tree/view.c | |||
@@ -1,5 +1,6 @@ | |||
1 | #define _POSIX_C_SOURCE 200809L | 1 | #define _POSIX_C_SOURCE 200809L |
2 | #include <stdlib.h> | 2 | #include <stdlib.h> |
3 | #include <strings.h> | ||
3 | #include <wayland-server.h> | 4 | #include <wayland-server.h> |
4 | #include <wlr/render/wlr_renderer.h> | 5 | #include <wlr/render/wlr_renderer.h> |
5 | #include <wlr/types/wlr_buffer.h> | 6 | #include <wlr/types/wlr_buffer.h> |
@@ -456,7 +457,13 @@ static struct sway_container *select_workspace(struct sway_view *view) { | |||
456 | if (criteria->type == CT_ASSIGN_WORKSPACE) { | 457 | if (criteria->type == CT_ASSIGN_WORKSPACE) { |
457 | ws = workspace_by_name(criteria->target); | 458 | ws = workspace_by_name(criteria->target); |
458 | if (!ws) { | 459 | if (!ws) { |
459 | ws = workspace_create(NULL, criteria->target); | 460 | if (strcasecmp(criteria->target, "back_and_forth") == 0) { |
461 | if (prev_workspace_name) { | ||
462 | ws = workspace_create(NULL, prev_workspace_name); | ||
463 | } | ||
464 | } else { | ||
465 | ws = workspace_create(NULL, criteria->target); | ||
466 | } | ||
460 | } | 467 | } |
461 | break; | 468 | break; |
462 | } else { | 469 | } else { |