mirror of
https://gitlab.freedesktop.org/wlroots/wlroots.git
synced 2025-11-13 13:29:44 -05:00
output-layer: don't mark ordering as dirty if it didn't change
This commit is contained in:
parent
606d6f990e
commit
07a6c75454
1 changed files with 18 additions and 0 deletions
|
|
@ -85,6 +85,15 @@ void wlr_output_layer_place_above(struct wlr_output_layer *layer,
|
|||
|
||||
wl_list_remove(&layer->pending.link);
|
||||
wl_list_insert(&sibling->pending.link, &layer->pending.link);
|
||||
|
||||
if (layer->current.link.prev != &layer->output->layers) {
|
||||
struct wlr_output_layer *prev =
|
||||
wl_container_of(layer->current.link.prev, prev, current.link);
|
||||
if (prev == sibling) {
|
||||
return;
|
||||
}
|
||||
}
|
||||
|
||||
layer->pending.committed |= WLR_OUTPUT_LAYER_STATE_LINK;
|
||||
layer->output->pending.committed |= WLR_OUTPUT_STATE_LAYERS;
|
||||
}
|
||||
|
|
@ -95,6 +104,15 @@ void wlr_output_layer_place_below(struct wlr_output_layer *layer,
|
|||
|
||||
wl_list_remove(&layer->pending.link);
|
||||
wl_list_insert(sibling->pending.link.prev, &layer->pending.link);
|
||||
|
||||
if (layer->current.link.next != &layer->output->layers) {
|
||||
struct wlr_output_layer *next =
|
||||
wl_container_of(layer->current.link.next, next, current.link);
|
||||
if (next == sibling) {
|
||||
return;
|
||||
}
|
||||
}
|
||||
|
||||
layer->pending.committed |= WLR_OUTPUT_LAYER_STATE_LINK;
|
||||
layer->output->pending.committed |= WLR_OUTPUT_STATE_LAYERS;
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue