diff options
author | Simon Ser <contact@emersion.fr> | 2023-02-21 09:40:28 +0100 |
---|---|---|
committer | Isaac Freund <mail@isaacfreund.com> | 2023-03-28 22:58:29 +0000 |
commit | fcc092c2a68c912d8aaf12618fd9afa734ff6170 (patch) | |
tree | 45f771c4baf903f014e86890b67276b293c91915 /backend | |
parent | e8a2f76eb495580ad81634a575a48f06ea74eb6a (diff) |
backend/wayland: only update layer position when necessary
Diffstat (limited to 'backend')
-rw-r--r-- | backend/wayland/output.c | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/backend/wayland/output.c b/backend/wayland/output.c index 1fa2cd32..e74a6ef2 100644 --- a/backend/wayland/output.c +++ b/backend/wayland/output.c @@ -367,8 +367,9 @@ static bool has_layers_order_changed(struct wlr_wl_output *output, static bool output_layer_commit(struct wlr_wl_output *output, struct wlr_wl_output_layer *layer, const struct wlr_output_layer_state *state) { - // TODO: only do this if the layer moved - wl_subsurface_set_position(layer->subsurface, state->x, state->y); + if (state->layer->x != state->x || state->layer->y != state->y) { + wl_subsurface_set_position(layer->subsurface, state->x, state->y); + } struct wlr_wl_buffer *buffer = NULL; if (state->buffer != NULL) { |