mirror of
https://github.com/gwenhael-le-moine/sway-patched-tray-menu.git
synced 2024-12-26 21:58:08 +01:00
layer-shell: don't configure uninitialized surfaces
This commit is contained in:
parent
8d1b0cecd9
commit
2c69e19fd3
1 changed files with 5 additions and 0 deletions
|
@ -131,6 +131,9 @@ static void arrange_layer(struct sway_output *output, struct wl_list *list,
|
||||||
&full_area.width, &full_area.height);
|
&full_area.width, &full_area.height);
|
||||||
wl_list_for_each(sway_layer, list, link) {
|
wl_list_for_each(sway_layer, list, link) {
|
||||||
struct wlr_layer_surface_v1 *layer = sway_layer->layer_surface;
|
struct wlr_layer_surface_v1 *layer = sway_layer->layer_surface;
|
||||||
|
if (!layer->initialized) {
|
||||||
|
return;
|
||||||
|
}
|
||||||
struct wlr_layer_surface_v1_state *state = &layer->current;
|
struct wlr_layer_surface_v1_state *state = &layer->current;
|
||||||
if (exclusive != (state->exclusive_zone > 0)) {
|
if (exclusive != (state->exclusive_zone > 0)) {
|
||||||
continue;
|
continue;
|
||||||
|
@ -327,6 +330,8 @@ static void handle_surface_commit(struct wl_listener *listener, void *data) {
|
||||||
|
|
||||||
if (layer_surface->initial_commit) {
|
if (layer_surface->initial_commit) {
|
||||||
surface_enter_output(layer_surface->surface, output);
|
surface_enter_output(layer_surface->surface, output);
|
||||||
|
} else if (!layer_surface->initialized) {
|
||||||
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
struct wlr_box old_extent = layer->extent;
|
struct wlr_box old_extent = layer->extent;
|
||||||
|
|
Loading…
Reference in a new issue