mirror of
https://github.com/swaywm/sway.git
synced 2025-11-17 06:59:48 -05:00
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.
This commit is contained in:
parent
13a4b0512e
commit
dc83b158e1
3 changed files with 54 additions and 33 deletions
|
|
@ -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);
|
||||
}
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue