Prevent a layer shell infinite looping case

This commit try to fix a case we encounter when running swayout, a layer
shell to display text above the background.

When running wayout, other layer shell start to consume 100% of the CPU.
This seems related to a previous fix 744e85b. Then later, another commit
reworks this handle_surface_commit method 5fd5d643.

This is a tentative to fix the issue without missing the points of those
patches.

We basically try to not re-arrange layers if no layer changed.
This commit is contained in:
Stacy Harper 2021-12-13 18:25:05 +01:00
parent 4732325f59
commit c00746c111
No known key found for this signature in database
GPG key ID: EABA44759877E02A

View file

@ -308,8 +308,8 @@ static void handle_surface_commit(struct wl_listener *listener, void *data) {
wl_list_insert(&output->layers[layer_surface->current.layer],
&layer->link);
layer->layer = layer_surface->current.layer;
arrange_layers(output);
}
arrange_layers(output);
}
wlr_surface_get_extends(layer_surface->surface, &layer->extent);