gjdwebserver-overlay/gui-libs/wlroots/files/9ed578d159.patch

42 lines
1.4 KiB
Diff

From 9ed578d15949cc01bd756ffc0d9d12e9cc73074f Mon Sep 17 00:00:00 2001
From: Gerben Jan Dijkman <gjdijkman@gjdwebserver.nl>
Date: Tue, 10 Jan 2023 19:47:13 +0100
Subject: [PATCH] Reverted layer-shell: error on 0 dimension without anchors
Signed-off-by: Gerben Jan Dijkman <gjdijkman@gjdwebserver.nl>
---
types/wlr_layer_shell_v1.c | 20 --------------------
1 file changed, 20 deletions(-)
diff --git a/types/wlr_layer_shell_v1.c b/types/wlr_layer_shell_v1.c
index 456dbc0e..55a6cfb8 100644
--- a/types/wlr_layer_shell_v1.c
+++ b/types/wlr_layer_shell_v1.c
@@ -328,26 +328,6 @@ static void layer_surface_role_commit(struct wlr_surface *wlr_surface) {
return;
}
- const uint32_t horiz = ZWLR_LAYER_SURFACE_V1_ANCHOR_LEFT |
- ZWLR_LAYER_SURFACE_V1_ANCHOR_RIGHT;
- if (surface->pending.desired_width == 0 &&
- (surface->pending.anchor & horiz) != horiz) {
- wl_resource_post_error(surface->resource,
- ZWLR_LAYER_SURFACE_V1_ERROR_INVALID_SIZE,
- "width 0 requested without setting left and right anchors");
- return;
- }
-
- const uint32_t vert = ZWLR_LAYER_SURFACE_V1_ANCHOR_TOP |
- ZWLR_LAYER_SURFACE_V1_ANCHOR_BOTTOM;
- if (surface->pending.desired_height == 0 &&
- (surface->pending.anchor & vert) != vert) {
- wl_resource_post_error(surface->resource,
- ZWLR_LAYER_SURFACE_V1_ERROR_INVALID_SIZE,
- "height 0 requested without setting top and bottom anchors");
- return;
- }
-
surface->current = surface->pending;
surface->pending.committed = 0;