From f751c33a70437632b4564bc60a72e200d73f557f Mon Sep 17 00:00:00 2001 From: Gerben Jan Dijkman Date: Tue, 10 Jan 2023 17:47:05 +0100 Subject: [PATCH] Added revert patch --- ...751a6d84335fb04288b8efab6dd5c90288d3.patch | 49 ------------------- gui-libs/wlroots/files/9ed578d159.patch | 41 ++++++++++++++++ gui-libs/wlroots/wlroots-0.15.1-r2.ebuild | 1 + 3 files changed, 42 insertions(+), 49 deletions(-) delete mode 100644 gui-libs/wlroots/files/8dec751a6d84335fb04288b8efab6dd5c90288d3.patch create mode 100644 gui-libs/wlroots/files/9ed578d159.patch diff --git a/gui-libs/wlroots/files/8dec751a6d84335fb04288b8efab6dd5c90288d3.patch b/gui-libs/wlroots/files/8dec751a6d84335fb04288b8efab6dd5c90288d3.patch deleted file mode 100644 index ea60fd6..0000000 --- a/gui-libs/wlroots/files/8dec751a6d84335fb04288b8efab6dd5c90288d3.patch +++ /dev/null @@ -1,49 +0,0 @@ -From 8dec751a6d84335fb04288b8efab6dd5c90288d3 Mon Sep 17 00:00:00 2001 -From: Isaac Freund -Date: Fri, 9 Oct 2020 15:28:07 +0200 -Subject: [PATCH] layer-shell: error on 0 dimension without anchors - -The protocol requires clients to set opposing anchors when requesting -a width or height of 0. - -The goal of this patch is not to break clients that rely on this -behavior but to improve the consistency of the layer shell ecosystem -through adherence to the protocol. ---- - types/wlr_layer_shell_v1.c | 20 ++++++++++++++++++++ - 1 file changed, 20 insertions(+) - -diff --git a/types/wlr_layer_shell_v1.c b/types/wlr_layer_shell_v1.c -index d83b22b86..bc6811179 100644 ---- a/types/wlr_layer_shell_v1.c -+++ b/types/wlr_layer_shell_v1.c -@@ -307,6 +307,26 @@ 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->client_pending.desired_width == 0 && -+ (surface->client_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->client_pending.desired_height == 0 && -+ (surface->client_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; -+ } -+ - if (surface->closed) { - // Ignore commits after the compositor has closed it - return; --- -GitLab - diff --git a/gui-libs/wlroots/files/9ed578d159.patch b/gui-libs/wlroots/files/9ed578d159.patch new file mode 100644 index 0000000..6f8dc57 --- /dev/null +++ b/gui-libs/wlroots/files/9ed578d159.patch @@ -0,0 +1,41 @@ +From 9ed578d15949cc01bd756ffc0d9d12e9cc73074f Mon Sep 17 00:00:00 2001 +From: Gerben Jan Dijkman +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 +--- + 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; + diff --git a/gui-libs/wlroots/wlroots-0.15.1-r2.ebuild b/gui-libs/wlroots/wlroots-0.15.1-r2.ebuild index d1d2039..a8ac5ab 100644 --- a/gui-libs/wlroots/wlroots-0.15.1-r2.ebuild +++ b/gui-libs/wlroots/wlroots-0.15.1-r2.ebuild @@ -56,6 +56,7 @@ PATCHES=( "${FILESDIR}"/13fcdba75cf5f21cfd49c1a05f4fa62f77619b40.patch "${FILESDIR}"/17b2b06633729f1826715c1d0b84614aa3cedb3a.patch "${FILESDIR}"/dd03d839ab56c3e5d7c607a8d76e58e0b75edb85.patch + "${FILESDIR}"/9ed578d159.patch )