summaryrefslogtreecommitdiffstats
path: root/sway/layout.c
diff options
context:
space:
mode:
authorLibravatar Mikkel Oscar Lyderik <mikkeloscar@gmail.com>2016-03-04 16:44:49 +0100
committerLibravatar Mikkel Oscar Lyderik <mikkeloscar@gmail.com>2016-03-04 16:44:49 +0100
commit8ddafeeaae44db77bfdb55d1776513d88a58f68e (patch)
tree4f4400de4a29dfa18ae10da6e71ea60146190155 /sway/layout.c
parentMerge pull request #495 from gpyh/docswaybar (diff)
downloadsway-8ddafeeaae44db77bfdb55d1776513d88a58f68e.tar.gz
sway-8ddafeeaae44db77bfdb55d1776513d88a58f68e.tar.zst
sway-8ddafeeaae44db77bfdb55d1776513d88a58f68e.zip
Fix assigning workspaces to outputs
It's possible to assign workspaces to certain outputs using the command: workspace <name> output <output> However, this did not work in some cases where the workspace was assigned before the given output was made available to sway. This patch fixes those cases.
Diffstat (limited to 'sway/layout.c')
-rw-r--r--sway/layout.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/sway/layout.c b/sway/layout.c
index dca4e47f..e9998bc8 100644
--- a/sway/layout.c
+++ b/sway/layout.c
@@ -364,7 +364,7 @@ void move_workspace_to(swayc_t* workspace, swayc_t* destination) {
364 364
365 // make sure source output has a workspace 365 // make sure source output has a workspace
366 if (src_op->children->length == 0) { 366 if (src_op->children->length == 0) {
367 char *ws_name = workspace_next_name(); 367 char *ws_name = workspace_next_name(src_op->name);
368 swayc_t *ws = new_workspace(src_op, ws_name); 368 swayc_t *ws = new_workspace(src_op, ws_name);
369 ws->is_focused = true; 369 ws->is_focused = true;
370 free(ws_name); 370 free(ws_name);