From dc83b158e12ae33f03165cfd64a50aa7f0a52e26 Mon Sep 17 00:00:00 2001 From: Ryan Dwyer Date: Fri, 25 May 2018 15:39:14 +1000 Subject: Fix issues with sticky containers and workspaces * Attach sticky containers to new workspaces when switching * Fire the close event *before* we start destroying the workspace to prevent a crash Because the sticky container now follows the visible workspace, this simplifies the rendering and container_at logic. --- sway/desktop/output.c | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) (limited to 'sway/desktop/output.c') diff --git a/sway/desktop/output.c b/sway/desktop/output.c index c0e368d0..fb80fd87 100644 --- a/sway/desktop/output.c +++ b/sway/desktop/output.c @@ -832,12 +832,13 @@ static void render_floating(struct sway_output *soutput, for (int j = 0; j < output->children->length; ++j) { struct sway_container *workspace = output->children->items[j]; struct sway_workspace *ws = workspace->sway_workspace; - bool ws_is_visible = workspace_is_visible(workspace); + if (!workspace_is_visible(workspace)) { + continue; + } for (int k = 0; k < ws->floating->children->length; ++k) { struct sway_container *floater = ws->floating->children->items[k]; - if ((ws_is_visible || floater->is_sticky) - && floater_intersects_output(floater, soutput->swayc)) { + if (floater_intersects_output(floater, soutput->swayc)) { render_floating_container(soutput, damage, floater); } } -- cgit v1.2.3-54-g00ecf