diff options
author | Ryan Dwyer <ryandwyer1@gmail.com> | 2018-05-25 15:39:14 +1000 |
---|---|---|
committer | Ryan Dwyer <ryandwyer1@gmail.com> | 2018-06-01 23:14:58 +1000 |
commit | dc83b158e12ae33f03165cfd64a50aa7f0a52e26 (patch) | |
tree | a618595ef3b8c2eb29004cf8479742dc012a4561 /sway/desktop | |
parent | 13a4b0512e25b8da6e16ca1286f8b62fcc24c5cc (diff) | |
download | sway-dc83b158e12ae33f03165cfd64a50aa7f0a52e26.tar.xz |
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.
Diffstat (limited to 'sway/desktop')
-rw-r--r-- | sway/desktop/output.c | 7 |
1 files changed, 4 insertions, 3 deletions
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); } } |