From a2bc6f3bfd35c9785b8b3bb1a788587f298edef6 Mon Sep 17 00:00:00 2001 From: Mykyta Holubakha Date: Thu, 21 Jul 2016 22:47:35 +0300 Subject: Arrange backgrounds only when required --- sway/layout.c | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) (limited to 'sway/layout.c') 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); } } -- cgit v1.2.3