mirror of
https://github.com/swaywm/sway.git
synced 2026-04-18 06:46:56 -04:00
desktop/transaction: Deactivate workspace on inactive outputs
If the output is not active, it might not have a valid geometry to arrange for. Outputs do not gain a geometry until modeset, so if an output is connected with a configuration present to disable it, it will not have a geometry. If the output has a past workspace restored, this will be attemtped arranged to fit a 0x0 rectangle, which asserts when trying to sort out borders. Consider the workspace activated only if the output itself is active to get the scene nodes disabled.
This commit is contained in:
parent
8646510490
commit
184bb4e91b
1 changed files with 1 additions and 1 deletions
|
|
@ -559,7 +559,7 @@ static void arrange_output(struct sway_output *output, int width, int height) {
|
||||||
for (int i = 0; i < output->current.workspaces->length; i++) {
|
for (int i = 0; i < output->current.workspaces->length; i++) {
|
||||||
struct sway_workspace *child = output->current.workspaces->items[i];
|
struct sway_workspace *child = output->current.workspaces->items[i];
|
||||||
|
|
||||||
bool activated = output->current.active_workspace == child;
|
bool activated = output->current.active_workspace == child && output->wlr_output->enabled;
|
||||||
|
|
||||||
wlr_scene_node_reparent(&child->layers.tiling->node, output->layers.tiling);
|
wlr_scene_node_reparent(&child->layers.tiling->node, output->layers.tiling);
|
||||||
wlr_scene_node_reparent(&child->layers.fullscreen->node, output->layers.fullscreen);
|
wlr_scene_node_reparent(&child->layers.fullscreen->node, output->layers.fullscreen);
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue