aboutsummaryrefslogtreecommitdiffstats
path: root/sway/desktop/output.c
diff options
context:
space:
mode:
authorLibravatar Ryan Dwyer <ryandwyer1@gmail.com>2018-05-25 15:39:14 +1000
committerLibravatar Ryan Dwyer <ryandwyer1@gmail.com>2018-06-01 23:14:58 +1000
commitdc83b158e12ae33f03165cfd64a50aa7f0a52e26 (patch)
treea618595ef3b8c2eb29004cf8479742dc012a4561 /sway/desktop/output.c
parentFix unfullscreening a floating view (diff)
downloadsway-dc83b158e12ae33f03165cfd64a50aa7f0a52e26.tar.gz
sway-dc83b158e12ae33f03165cfd64a50aa7f0a52e26.tar.zst
sway-dc83b158e12ae33f03165cfd64a50aa7f0a52e26.zip
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/output.c')
-rw-r--r--sway/desktop/output.c7
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,
832 for (int j = 0; j < output->children->length; ++j) { 832 for (int j = 0; j < output->children->length; ++j) {
833 struct sway_container *workspace = output->children->items[j]; 833 struct sway_container *workspace = output->children->items[j];
834 struct sway_workspace *ws = workspace->sway_workspace; 834 struct sway_workspace *ws = workspace->sway_workspace;
835 bool ws_is_visible = workspace_is_visible(workspace); 835 if (!workspace_is_visible(workspace)) {
836 continue;
837 }
836 for (int k = 0; k < ws->floating->children->length; ++k) { 838 for (int k = 0; k < ws->floating->children->length; ++k) {
837 struct sway_container *floater = 839 struct sway_container *floater =
838 ws->floating->children->items[k]; 840 ws->floating->children->items[k];
839 if ((ws_is_visible || floater->is_sticky) 841 if (floater_intersects_output(floater, soutput->swayc)) {
840 && floater_intersects_output(floater, soutput->swayc)) {
841 render_floating_container(soutput, damage, floater); 842 render_floating_container(soutput, damage, floater);
842 } 843 }
843 } 844 }