mirror of
https://gitlab.freedesktop.org/wlroots/wlroots.git
synced 2024-11-22 07:02:28 +00:00
backend/wayland: only update layer position when necessary
This commit is contained in:
parent
e8a2f76eb4
commit
fcc092c2a6
@ -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,
|
static bool output_layer_commit(struct wlr_wl_output *output,
|
||||||
struct wlr_wl_output_layer *layer,
|
struct wlr_wl_output_layer *layer,
|
||||||
const struct wlr_output_layer_state *state) {
|
const struct wlr_output_layer_state *state) {
|
||||||
// TODO: only do this if the layer moved
|
if (state->layer->x != state->x || state->layer->y != state->y) {
|
||||||
wl_subsurface_set_position(layer->subsurface, state->x, state->y);
|
wl_subsurface_set_position(layer->subsurface, state->x, state->y);
|
||||||
|
}
|
||||||
|
|
||||||
struct wlr_wl_buffer *buffer = NULL;
|
struct wlr_wl_buffer *buffer = NULL;
|
||||||
if (state->buffer != NULL) {
|
if (state->buffer != NULL) {
|
||||||
|
Loading…
Reference in New Issue
Block a user