From 5a1d95ac2ab39857c51a720624118e4fde292ab4 Mon Sep 17 00:00:00 2001 From: Drew DeVault Date: Mon, 18 Jul 2016 09:12:48 -0400 Subject: [PATCH] Move backgrounds to back after arrange_windows Fixes #769 --- sway/layout.c | 5 +++++ sway/workspace.c | 4 ---- 2 files changed, 5 insertions(+), 4 deletions(-) diff --git a/sway/layout.c b/sway/layout.c index 3d746ebe..2e0bf0bb 100644 --- a/sway/layout.c +++ b/sway/layout.c @@ -959,6 +959,11 @@ void arrange_windows(swayc_t *container, double width, double height) { update_visibility(container); arrange_windows_r(container, width, height); layout_log(&root_container, 0); + + for (int i = 0; i < desktop_shell.backgrounds->length; ++i) { + struct background_config *bg = desktop_shell.backgrounds->items[i]; + wlc_view_send_to_back(bg->handle); + } } /** diff --git a/sway/workspace.c b/sway/workspace.c index 3ac6626c..913a412c 100644 --- a/sway/workspace.c +++ b/sway/workspace.c @@ -309,10 +309,6 @@ bool workspace_switch(swayc_t *workspace) { } swayc_t *output = swayc_parent_by_type(workspace, C_OUTPUT); arrange_windows(output, -1, -1); - for (int i = 0; i < desktop_shell.backgrounds->length; ++i) { - struct background_config *bg = desktop_shell.backgrounds->items[i]; - wlc_view_send_to_back(bg->handle); - } return true; }