From 2bd587995084009be50e0ae089803b0bae72c5af Mon Sep 17 00:00:00 2001 From: Simon Ser Date: Tue, 6 Jun 2023 19:58:29 +0200 Subject: [PATCH] backend/wayland: do not require viewporter for empty layer src_box --- backend/wayland/output.c | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/backend/wayland/output.c b/backend/wayland/output.c index 1896e5088..0fc5c38dd 100644 --- a/backend/wayland/output.c +++ b/backend/wayland/output.c @@ -255,10 +255,11 @@ static bool layer_needs_viewport(struct wlr_output_layer_state *layer_state) { layer_state->dst_box.height != layer_state->buffer->height) { return true; } - if (layer_state->src_box.x != 0 || + if (!wlr_fbox_empty(&layer_state->src_box) && + (layer_state->src_box.x != 0 || layer_state->src_box.y != 0 || layer_state->src_box.width != layer_state->dst_box.width || - layer_state->src_box.height != layer_state->dst_box.height) { + layer_state->src_box.height != layer_state->dst_box.height)) { return true; } return false;