aboutsummaryrefslogtreecommitdiff
path: root/sway
diff options
context:
space:
mode:
Diffstat (limited to 'sway')
-rw-r--r--sway/focus.c1
-rw-r--r--sway/layout.c5
-rw-r--r--sway/workspace.c1
3 files changed, 6 insertions, 1 deletions
diff --git a/sway/focus.c b/sway/focus.c
index 97fa4b98..9974ba6a 100644
--- a/sway/focus.c
+++ b/sway/focus.c
@@ -158,6 +158,7 @@ bool set_focused_container(swayc_t *c) {
// rearrange if parent container is tabbed/stacked
swayc_t *parent = swayc_tabbed_stacked_ancestor(p);
if (parent != NULL) {
+ arrange_backgrounds();
arrange_windows(parent, -1, -1);
}
} else if (p->type == C_WORKSPACE) {
diff --git a/sway/layout.c b/sway/layout.c
index d32b4139..faa108a1 100644
--- a/sway/layout.c
+++ b/sway/layout.c
@@ -961,9 +961,12 @@ void arrange_windows(swayc_t *container, double width, double height) {
update_visibility(container);
arrange_windows_r(container, width, height);
layout_log(&root_container, 0);
+}
+void arrange_backgrounds(void) {
+ struct background_config *bg;
for (int i = 0; i < desktop_shell.backgrounds->length; ++i) {
- struct background_config *bg = desktop_shell.backgrounds->items[i];
+ bg = desktop_shell.backgrounds->items[i];
wlc_view_send_to_back(bg->handle);
}
}
diff --git a/sway/workspace.c b/sway/workspace.c
index 913a412c..9c3e69a9 100644
--- a/sway/workspace.c
+++ b/sway/workspace.c
@@ -308,6 +308,7 @@ bool workspace_switch(swayc_t *workspace) {
return false;
}
swayc_t *output = swayc_parent_by_type(workspace, C_OUTPUT);
+ arrange_backgrounds();
arrange_windows(output, -1, -1);
return true;
}