The package rpms/wlroots.git has added or updated architecture specific content in its
spec file (ExclusiveArch/ExcludeArch or %ifarch/%ifnarch) in commit(s):
https://src.fedoraproject.org/cgit/rpms/wlroots.git/commit/?id=3993c57fb9....
Change:
-%ifarch s390x
Thanks.
Full change:
============
commit b32c37f87e47740a5d4c9e7a47a3bf7f33ade290
Author: Aleksei Bavshin <alebastr(a)fedoraproject.org>
Date: Sun Dec 25 08:14:54 2022 -0800
Update to 0.16.1
diff --git a/sources b/sources
index 12a60d6..da36423 100644
--- a/sources
+++ b/sources
@@ -1,2 +1,2 @@
-SHA512 (wlroots-0.16.0.tar.gz) =
f5a7ea444f77ec563a4cf40831c43fbe8593a61a31cc9e04f45abf0603d9dab11b90e0f7cda0cd65df40c36257377c101bbbd9e4cb9dd5cde0baa7abb558cc87
-SHA512 (wlroots-0.16.0.tar.gz.sig) =
98d0579f8a4b863f2c57cfcd9849811ac2bf5945b5b2511c7e1eb4f73e5db8af02265e9fa2e5b3330af141506b1d4e3c22a35cd8669ebd5633388e3c6bc5d2d3
+SHA512 (wlroots-0.16.1.tar.gz) =
e676717b8e0f6a52ae02bd8187c70c5ce5f73c00c251bdfe94285d12b960e1a519a663ebd12a7686979d259977080560b22ef8dbbb6594234eb137dfaf0fea58
+SHA512 (wlroots-0.16.1.tar.gz.sig) =
0af3783ed826d590416c3834bc5c0383e4b9aa206e592bcb838bdd1bf93f89192839d0ca699078d5076cd60b37fe1354199e06b8ad2e45ebb270e7ab31c32e12
diff --git a/wlroots-0.16-backports.patch b/wlroots-0.16-backports.patch
deleted file mode 100644
index ed9b7a9..0000000
--- a/wlroots-0.16-backports.patch
+++ /dev/null
@@ -1,454 +0,0 @@
-From bc6422115cf0dd0c065d3a6ec4d1ac363aad39fd Mon Sep 17 00:00:00 2001
-From: Simon Zeni <simon(a)bl4ckb0ne.ca>
-Date: Fri, 11 Nov 2022 14:52:24 -0500
-Subject: [PATCH 01/12] render/egl: fix uninitialized pointers in
- init_dmabuf_formats
-
-`modifiers` and `external_only` are never initialized, and free'd later. This
-commit explicitly initializes them to NULL to prevent segfaults on `free()`
-
-(cherry picked from commit ed71915742160f2b9157adbad79364e22ab7ebda)
----
- render/egl.c | 4 ++--
- 1 file changed, 2 insertions(+), 2 deletions(-)
-
-diff --git a/render/egl.c b/render/egl.c
-index e3839c7d..0c25e036 100644
---- a/render/egl.c
-+++ b/render/egl.c
-@@ -124,8 +124,8 @@ static void init_dmabuf_formats(struct wlr_egl *egl) {
- for (int i = 0; i < formats_len; i++) {
- uint32_t fmt = formats[i];
-
-- uint64_t *modifiers;
-- EGLBoolean *external_only;
-+ uint64_t *modifiers = NULL;
-+ EGLBoolean *external_only = NULL;
- int modifiers_len = 0;
- if (!no_modifiers) {
- modifiers_len = get_egl_dmabuf_modifiers(egl, fmt, &modifiers,
&external_only);
---
-2.38.1
-
-
-From a6ff023df291a770fb907a88ca39b9ee5b1cc89e Mon Sep 17 00:00:00 2001
-From: Simon Ser <contact(a)emersion.fr>
-Date: Tue, 15 Nov 2022 10:55:38 +0100
-Subject: [PATCH 02/12] backend/drm: only request page-flip if active
-
-It doesn't make sense to request a page-flip for a disabled output.
-
-Fixes: 84e727daae67 ("backend/drm: request page-flip event on modeset")
-Closes:
https://gitlab.freedesktop.org/wlroots/wlroots/-/issues/3528
-(cherry picked from commit f863b93c05a73097ccddce1ed066f3f11bfb1c3e)
----
- backend/drm/drm.c | 2 +-
- 1 file changed, 1 insertion(+), 1 deletion(-)
-
-diff --git a/backend/drm/drm.c b/backend/drm/drm.c
-index 04994c68..1f4e74c5 100644
---- a/backend/drm/drm.c
-+++ b/backend/drm/drm.c
-@@ -577,7 +577,7 @@ bool drm_connector_commit_state(struct wlr_drm_connector *conn,
- return false;
- }
- }
-- if (pending.modeset) {
-+ if (pending.modeset && pending.active) {
- flags |= DRM_MODE_PAGE_FLIP_EVENT;
- }
-
---
-2.38.1
-
-
-From 990cba89662c5d892dd8e045e737b6ada2f6d1ae Mon Sep 17 00:00:00 2001
-From: bi4k8 <bi4k8-js7gse3b01w(a)mt2015.com>
-Date: Tue, 15 Nov 2022 01:00:27 +0000
-Subject: [PATCH 03/12] wlr_seat: clear `drag->seat_client` when destroyed
-
-This was previously a use-after-free in `wlr_drag.c`.
-
-(cherry picked from commit 8b12037cadb2422a10d948babc4fd77ce637f158)
----
- types/data_device/wlr_drag.c | 6 +++---
- types/seat/wlr_seat.c | 4 ++++
- 2 files changed, 7 insertions(+), 3 deletions(-)
-
-diff --git a/types/data_device/wlr_drag.c b/types/data_device/wlr_drag.c
-index d3cb979d..c1fa801b 100644
---- a/types/data_device/wlr_drag.c
-+++ b/types/data_device/wlr_drag.c
-@@ -55,14 +55,14 @@ static void drag_set_focus(struct wlr_drag *drag,
- goto out;
- }
-
-- if (!drag->source &&
-+ if (!drag->source && drag->seat_client &&
- wl_resource_get_client(surface->resource) !=
- drag->seat_client->client) {
- goto out;
- }
-
- struct wlr_seat_client *focus_client = wlr_seat_client_for_wl_client(
-- drag->seat_client->seat, wl_resource_get_client(surface->resource));
-+ drag->seat, wl_resource_get_client(surface->resource));
- if (!focus_client) {
- goto out;
- }
-@@ -71,7 +71,7 @@ static void drag_set_focus(struct wlr_drag *drag,
- drag->source->accepted = false;
-
- uint32_t serial =
-- wl_display_next_serial(drag->seat_client->seat->display);
-+ wl_display_next_serial(drag->seat->display);
-
- struct wl_resource *device_resource;
- wl_resource_for_each(device_resource, &focus_client->data_devices) {
-diff --git a/types/seat/wlr_seat.c b/types/seat/wlr_seat.c
-index 59b760ca..f83ccd6d 100644
---- a/types/seat/wlr_seat.c
-+++ b/types/seat/wlr_seat.c
-@@ -75,6 +75,10 @@ static void seat_client_handle_resource_destroy(
- client->seat->keyboard_state.focused_client = NULL;
- }
-
-+ if (client->seat->drag && client ==
client->seat->drag->seat_client) {
-+ client->seat->drag->seat_client = NULL;
-+ }
-+
- struct wl_resource *resource, *tmp;
- wl_resource_for_each_safe(resource, tmp, &client->pointers) {
- wl_resource_destroy(resource);
---
-2.38.1
-
-
-From b9b6334639bed442e039b61ec902692da557d4de Mon Sep 17 00:00:00 2001
-From: Kirill Primak <vyivel(a)eclair.cafe>
-Date: Sun, 13 Nov 2022 01:30:22 +0300
-Subject: [PATCH 04/12] xwayland: fix wlr_xwayland_surface_from_wlr_surface()
- docs
-
-32daa43a454bcea1306ad0976fd4161ce8c7e86f has removed the asymmetry in
-the relationship of a wlr_surface and an unmapped wlr_xwayland_surface,
-when wlr_surface.role_data wasn't NULL but wlr_xwayland_surface.surface
-was. However, this also means that
-wlr_xwayland_surface_from_wlr_surface() now returns NULL if the
-wlr_surface is unmapped. Fix the documentation to reflect this.
-
-(cherry picked from commit 627a5c511278e67c3c308cdc6a639cbb490f48c3)
----
- include/wlr/xwayland/xwayland.h | 2 +-
- 1 file changed, 1 insertion(+), 1 deletion(-)
-
-diff --git a/include/wlr/xwayland/xwayland.h b/include/wlr/xwayland/xwayland.h
-index fd161937..372ab9a8 100644
---- a/include/wlr/xwayland/xwayland.h
-+++ b/include/wlr/xwayland/xwayland.h
-@@ -232,7 +232,7 @@ bool wlr_surface_is_xwayland_surface(struct wlr_surface *surface);
- * Get a struct wlr_xwayland_surface from a struct wlr_surface.
- * Asserts that the surface has the xwayland surface role.
- * May return NULL even if the surface has the xwayland surface role if the
-- * corresponding xwayland surface has been destroyed.
-+ * corresponding xwayland surface has been unmapped or destroyed.
- */
- struct wlr_xwayland_surface *wlr_xwayland_surface_from_wlr_surface(
- struct wlr_surface *surface);
---
-2.38.1
-
-
-From e169ebb8cfbdb92f932b3f973e20ce79495bd983 Mon Sep 17 00:00:00 2001
-From: Simon Ser <contact(a)emersion.fr>
-Date: Thu, 10 Nov 2022 12:28:34 +0100
-Subject: [PATCH 05/12] backend/drm: log refresh rate in Hz
-
-(cherry picked from commit b3da33116ea9fb3ef948ae72425534b43c217579)
----
- backend/drm/drm.c | 4 ++--
- 1 file changed, 2 insertions(+), 2 deletions(-)
-
-diff --git a/backend/drm/drm.c b/backend/drm/drm.c
-index 1f4e74c5..55f95c91 100644
---- a/backend/drm/drm.c
-+++ b/backend/drm/drm.c
-@@ -1302,9 +1302,9 @@ static void connect_drm_connector(struct wlr_drm_connector
*wlr_conn,
- wlr_conn->crtc->mode_id = mode_id;
- }
-
-- wlr_log(WLR_INFO, " %"PRId32"x%"PRId32"@%"PRId32"
%s",
-+ wlr_log(WLR_INFO, " %"PRId32"x%"PRId32" @ %.3f Hz %s",
- mode->wlr_mode.width, mode->wlr_mode.height,
-- mode->wlr_mode.refresh,
-+ (float)mode->wlr_mode.refresh / 1000,
- mode->wlr_mode.preferred ? "(preferred)" : "");
-
- wl_list_insert(wlr_conn->output.modes.prev, &mode->wlr_mode.link);
---
-2.38.1
-
-
-From 356ac5eed90a2c8b899dbfaf8a7a17237868adeb Mon Sep 17 00:00:00 2001
-From: Simon Ser <contact(a)emersion.fr>
-Date: Thu, 10 Nov 2022 12:28:53 +0100
-Subject: [PATCH 06/12] backend/drm: log modesetting commits
-
-(cherry picked from commit 65836ce357e4140d4e5250228a05ddd96119a883)
----
- backend/drm/drm.c | 6 ++++++
- 1 file changed, 6 insertions(+)
-
-diff --git a/backend/drm/drm.c b/backend/drm/drm.c
-index 55f95c91..74265d4f 100644
---- a/backend/drm/drm.c
-+++ b/backend/drm/drm.c
-@@ -581,6 +581,12 @@ bool drm_connector_commit_state(struct wlr_drm_connector *conn,
- flags |= DRM_MODE_PAGE_FLIP_EVENT;
- }
-
-+ if (pending.modeset) {
-+ wlr_drm_conn_log(conn, WLR_INFO, "Modesetting with %dx%d @ %.3f Hz",
-+ pending.mode.hdisplay, pending.mode.vdisplay,
-+ (float)calculate_refresh_rate(&pending.mode) / 1000);
-+ }
-+
- if (!drm_crtc_commit(conn, &pending, flags, false)) {
- return false;
- }
---
-2.38.1
-
-
-From 9c5445148235109b4fb986138c6294db4d0334d8 Mon Sep 17 00:00:00 2001
-From: Simon Ser <contact(a)emersion.fr>
-Date: Tue, 15 Nov 2022 10:06:23 +0100
-Subject: [PATCH 07/12] backend/drm: fix FPE when disabling output
-
-Fixes: 65836ce357e4 ("backend/drm: log modesetting commits")
-Closes:
https://gitlab.freedesktop.org/wlroots/wlroots/-/issues/3534
-(cherry picked from commit a40ba16a6414f72ae0224164bb08cd8479dc52ee)
----
- backend/drm/drm.c | 10 +++++++---
- 1 file changed, 7 insertions(+), 3 deletions(-)
-
-diff --git a/backend/drm/drm.c b/backend/drm/drm.c
-index 74265d4f..a7ff585e 100644
---- a/backend/drm/drm.c
-+++ b/backend/drm/drm.c
-@@ -582,9 +582,13 @@ bool drm_connector_commit_state(struct wlr_drm_connector *conn,
- }
-
- if (pending.modeset) {
-- wlr_drm_conn_log(conn, WLR_INFO, "Modesetting with %dx%d @ %.3f Hz",
-- pending.mode.hdisplay, pending.mode.vdisplay,
-- (float)calculate_refresh_rate(&pending.mode) / 1000);
-+ if (pending.active) {
-+ wlr_drm_conn_log(conn, WLR_INFO, "Modesetting with %dx%d @ %.3f Hz",
-+ pending.mode.hdisplay, pending.mode.vdisplay,
-+ (float)calculate_refresh_rate(&pending.mode) / 1000);
-+ } else {
-+ wlr_drm_conn_log(conn, WLR_INFO, "Turning off");
-+ }
- }
-
- if (!drm_crtc_commit(conn, &pending, flags, false)) {
---
-2.38.1
-
-
-From 724bc296f5a3dce3b619cf089b711cff3a8ece37 Mon Sep 17 00:00:00 2001
-From: =?UTF-8?q?Guido=20G=C3=BCnther?= <agx(a)sigxcpu.org>
-Date: Thu, 24 Nov 2022 22:38:29 +0100
-Subject: [PATCH 08/12] seat/pointer: Initialize low_res_value
-
-Fixes
-
- In file included from /usr/include/wayland-server-core.h:32,
- from ../types/seat/wlr_seat_pointer.c:6:
- In function 'wl_fixed_from_double',
- inlined from 'wlr_seat_pointer_send_axis' at
../types/seat/wlr_seat_pointer.c:367:6:
- /usr/include/wayland-util.h:641:17: error: 'low_res_value' may be used
uninitialized [-Werror=maybe-uninitialized]
- 641 | u.d = d + (3LL << (51 - 8));
- | ~~^~~~~~~~~~~~~~~~~~~
- ../types/seat/wlr_seat_pointer.c: In function 'wlr_seat_pointer_send_axis':
- ../types/seat/wlr_seat_pointer.c:329:16: note: 'low_res_value' was declared
here
- 329 | double low_res_value;
- | ^~~~~~~~~~~~~
----
- types/seat/wlr_seat_pointer.c | 2 +-
- 1 file changed, 1 insertion(+), 1 deletion(-)
-
-diff --git a/types/seat/wlr_seat_pointer.c b/types/seat/wlr_seat_pointer.c
-index 8d6154b0..ffa706bd 100644
---- a/types/seat/wlr_seat_pointer.c
-+++ b/types/seat/wlr_seat_pointer.c
-@@ -326,7 +326,7 @@ void wlr_seat_pointer_send_axis(struct wlr_seat *wlr_seat, uint32_t
time,
- send_source = true;
- }
-
-- double low_res_value;
-+ double low_res_value = 0.0;
- int32_t low_res_value_discrete = 0;
- update_value120_accumulators(client, orientation, value, value_discrete,
- &low_res_value, &low_res_value_discrete);
---
-2.38.1
-
-
-From 4892082836399fda80dd55671c46b005f0451c5c Mon Sep 17 00:00:00 2001
-From: Johan Malm <jgm323(a)gmail.com>
-Date: Sat, 26 Nov 2022 17:18:33 +0000
-Subject: [PATCH 09/12] scene/layer_shell_v1.c: set exclusive zone correctly
-
-...when only one edge is anchored.
-
-The layer-shell protocol specifies that a positive exclusive-zone value is
-'meaningful' if the surface is anchored to either:
-
-1. one edge
-2. one edge and both perpendicular edges.
-
-For example, if you wish to position a layer-shell client along the top
-edge and make it exclusive, you should be able to either set anchor=TOP or
-anchor=TOP|LEFT|RIGHT. It appears that many panels/bars use the latter
-approach (anchor to an edge and also both perpendicular edges) which is
-probably why this has not been reported previously.
-
-This patch adds support for the first case and thereby makes exclusive
-zone behaviour consistent with the protocol and also with sway's extant
-layer-shell implementation.
-
-(cherry picked from commit 8e80432a72b18a1ddbacdb08ff0c41645578f1ee)
----
- types/scene/layer_shell_v1.c | 4 ++++
- 1 file changed, 4 insertions(+)
-
-diff --git a/types/scene/layer_shell_v1.c b/types/scene/layer_shell_v1.c
-index 22986983..e523d315 100644
---- a/types/scene/layer_shell_v1.c
-+++ b/types/scene/layer_shell_v1.c
-@@ -39,6 +39,7 @@ static void layer_surface_exclusive_zone(
- struct wlr_layer_surface_v1_state *state,
- struct wlr_box *usable_area) {
- switch (state->anchor) {
-+ case ZWLR_LAYER_SURFACE_V1_ANCHOR_TOP:
- case (ZWLR_LAYER_SURFACE_V1_ANCHOR_TOP |
- ZWLR_LAYER_SURFACE_V1_ANCHOR_LEFT |
- ZWLR_LAYER_SURFACE_V1_ANCHOR_RIGHT):
-@@ -46,12 +47,14 @@ static void layer_surface_exclusive_zone(
- usable_area->y += state->exclusive_zone + state->margin.top;
- usable_area->height -= state->exclusive_zone + state->margin.top;
- break;
-+ case ZWLR_LAYER_SURFACE_V1_ANCHOR_BOTTOM:
- case (ZWLR_LAYER_SURFACE_V1_ANCHOR_BOTTOM |
- ZWLR_LAYER_SURFACE_V1_ANCHOR_LEFT |
- ZWLR_LAYER_SURFACE_V1_ANCHOR_RIGHT):
- // Anchor bottom
- usable_area->height -= state->exclusive_zone + state->margin.bottom;
- break;
-+ case ZWLR_LAYER_SURFACE_V1_ANCHOR_LEFT:
- case (ZWLR_LAYER_SURFACE_V1_ANCHOR_TOP |
- ZWLR_LAYER_SURFACE_V1_ANCHOR_BOTTOM |
- ZWLR_LAYER_SURFACE_V1_ANCHOR_LEFT):
-@@ -59,6 +62,7 @@ static void layer_surface_exclusive_zone(
- usable_area->x += state->exclusive_zone + state->margin.left;
- usable_area->width -= state->exclusive_zone + state->margin.left;
- break;
-+ case ZWLR_LAYER_SURFACE_V1_ANCHOR_RIGHT:
- case (ZWLR_LAYER_SURFACE_V1_ANCHOR_TOP |
- ZWLR_LAYER_SURFACE_V1_ANCHOR_BOTTOM |
- ZWLR_LAYER_SURFACE_V1_ANCHOR_RIGHT): // Anchor right
---
-2.38.1
-
-
-From e0fe72ffdd66bcf2f43f728858d745171498d58d Mon Sep 17 00:00:00 2001
-From: Johan Malm <jgm323(a)gmail.com>
-Date: Sat, 26 Nov 2022 17:23:51 +0000
-Subject: [PATCH 10/12] scene/layer_shell_v1.c: remove redundant comment
-
-(cherry picked from commit 338e0a3976f2bad5ec048b022648a671ed443b4f)
----
- types/scene/layer_shell_v1.c | 2 +-
- 1 file changed, 1 insertion(+), 1 deletion(-)
-
-diff --git a/types/scene/layer_shell_v1.c b/types/scene/layer_shell_v1.c
-index e523d315..3ed616a9 100644
---- a/types/scene/layer_shell_v1.c
-+++ b/types/scene/layer_shell_v1.c
-@@ -65,7 +65,7 @@ static void layer_surface_exclusive_zone(
- case ZWLR_LAYER_SURFACE_V1_ANCHOR_RIGHT:
- case (ZWLR_LAYER_SURFACE_V1_ANCHOR_TOP |
- ZWLR_LAYER_SURFACE_V1_ANCHOR_BOTTOM |
-- ZWLR_LAYER_SURFACE_V1_ANCHOR_RIGHT): // Anchor right
-+ ZWLR_LAYER_SURFACE_V1_ANCHOR_RIGHT):
- // Anchor right
- usable_area->width -= state->exclusive_zone + state->margin.right;
- break;
---
-2.38.1
-
-
-From de5e091996bfa58a0a93fac38a45235b7cb06488 Mon Sep 17 00:00:00 2001
-From: Simon Zeni <simon(a)bl4ckb0ne.ca>
-Date: Tue, 29 Nov 2022 15:21:18 -0500
-Subject: [PATCH 11/12] types/wlr_seat: finish keyboard_state during
- wlr_seat_destroy
-
-(cherry picked from commit 0611c10909b17276bd633a4ee9a322995e9a3580)
----
- types/seat/wlr_seat.c | 2 ++
- 1 file changed, 2 insertions(+)
-
-diff --git a/types/seat/wlr_seat.c b/types/seat/wlr_seat.c
-index f83ccd6d..c2985824 100644
---- a/types/seat/wlr_seat.c
-+++ b/types/seat/wlr_seat.c
-@@ -179,6 +179,8 @@ void wlr_seat_destroy(struct wlr_seat *seat) {
- wlr_seat_pointer_clear_focus(seat);
- wlr_seat_keyboard_clear_focus(seat);
-
-+ wlr_seat_set_keyboard(seat, NULL);
-+
- struct wlr_touch_point *point;
- wl_list_for_each(point, &seat->touch_state.touch_points, link) {
- wlr_seat_touch_point_clear_focus(seat, 0, point->touch_id);
---
-2.38.1
-
-
-From f1bea43ccccd5824097d8660a2d20b5d0bf506be Mon Sep 17 00:00:00 2001
-From: Simon Ser <contact(a)emersion.fr>
-Date: Wed, 30 Nov 2022 15:58:08 +0100
-Subject: [PATCH 12/12] Revert "compositor: enforce surface destruction order"
-
-This reverts commit c09d3450d494e21f065c12f199fa5ba8bfd946a9.
-
-This doesn't play well with the Xwayland surface role.
----
- types/wlr_compositor.c | 8 --------
- 1 file changed, 8 deletions(-)
-
-diff --git a/types/wlr_compositor.c b/types/wlr_compositor.c
-index 5e6de244..fa4a8aa5 100644
---- a/types/wlr_compositor.c
-+++ b/types/wlr_compositor.c
-@@ -36,14 +36,6 @@ static int max(int fst, int snd) {
-
- static void surface_handle_destroy(struct wl_client *client,
- struct wl_resource *resource) {
-- struct wlr_surface *surface = wlr_surface_from_resource(resource);
-- if (surface->role_data != NULL) {
-- // TODO: send WL_SURFACE_ERROR_DEFUNCT_ROLE_OBJECT
-- //
https://gitlab.freedesktop.org/wayland/wayland/-/merge_requests/278
-- wl_resource_post_error(resource, -1,
-- "surface was destroyed before its role object");
-- return;
-- }
- wl_resource_destroy(resource);
- }
-
---
-2.38.1
-
diff --git a/wlroots-0.16-libdrm-2.4.109-compat.patch
b/wlroots-0.16-libdrm-2.4.109-compat.patch
deleted file mode 100644
index 997cf49..0000000
--- a/wlroots-0.16-libdrm-2.4.109-compat.patch
+++ /dev/null
@@ -1,241 +0,0 @@
-From 05ec8d7a160aa5fb1a7fb47c6711e3e95348fbf7 Mon Sep 17 00:00:00 2001
-From: Aleksei Bavshin <alebastr89(a)gmail.com>
-Date: Tue, 8 Nov 2022 18:37:13 -0800
-Subject: [PATCH 1/2] Compatibility with libdrm 2.4.112
-
----
- meson.build | 2 +-
- render/allocator/gbm.c | 7 ++-----
- render/egl.c | 5 +----
- render/vulkan/pixel_format.c | 6 ++----
- types/output/render.c | 7 ++-----
- 5 files changed, 8 insertions(+), 19 deletions(-)
-
-diff --git a/meson.build b/meson.build
-index 5dd38e1a..b2fbcf33 100644
---- a/meson.build
-+++ b/meson.build
-@@ -107,7 +107,7 @@ wayland_server = dependency('wayland-server',
- )
-
- drm = dependency('libdrm',
-- version: '>=2.4.113',
-+ version: '>=2.4.112',
- fallback: 'libdrm',
- default_options: [
- 'intel=disabled',
-diff --git a/render/allocator/gbm.c b/render/allocator/gbm.c
-index f77fedd8..805d80e3 100644
---- a/render/allocator/gbm.c
-+++ b/render/allocator/gbm.c
-@@ -138,14 +138,11 @@ static struct wlr_gbm_buffer *create_buffer(struct
wlr_gbm_allocator *alloc,
- buffer->dmabuf.modifier = fallback_modifier;
- }
-
-- char *format_name = drmGetFormatName(buffer->dmabuf.format);
- char *modifier_name = drmGetFormatModifierName(buffer->dmabuf.modifier);
- wlr_log(WLR_DEBUG, "Allocated %dx%d GBM buffer "
-- "with format %s (0x%08"PRIX32"), modifier %s
(0x%016"PRIX64")",
-- buffer->base.width, buffer->base.height,
-- format_name ? format_name : "<unknown>", buffer->dmabuf.format,
-+ "with format 0x%08"PRIX32", modifier %s
(0x%016"PRIX64")",
-+ buffer->base.width, buffer->base.height, buffer->dmabuf.format,
- modifier_name ? modifier_name : "<unknown>",
buffer->dmabuf.modifier);
-- free(format_name);
- free(modifier_name);
-
- return buffer;
-diff --git a/render/egl.c b/render/egl.c
-index e3839c7d..13068fe2 100644
---- a/render/egl.c
-+++ b/render/egl.c
-@@ -161,10 +161,7 @@ static void init_dmabuf_formats(struct wlr_egl *egl) {
- }
-
- if (wlr_log_get_verbosity() >= WLR_DEBUG) {
-- char *fmt_name = drmGetFormatName(fmt);
-- wlr_log(WLR_DEBUG, " %s (0x%08"PRIX32")",
-- fmt_name ? fmt_name : "<unknown>", fmt);
-- free(fmt_name);
-+ wlr_log(WLR_DEBUG, " 0x%08"PRIX32"", fmt);
-
- log_modifier(DRM_FORMAT_MOD_INVALID, false);
- if (modifiers_len == 0) {
-diff --git a/render/vulkan/pixel_format.c b/render/vulkan/pixel_format.c
-index f55063d7..d0008648 100644
---- a/render/vulkan/pixel_format.c
-+++ b/render/vulkan/pixel_format.c
-@@ -234,10 +234,8 @@ void vulkan_format_props_query(struct wlr_vk_device *dev,
- const struct wlr_vk_format *format) {
- VkResult res;
-
-- char *format_name = drmGetFormatName(format->drm_format);
-- wlr_log(WLR_DEBUG, " %s (0x%08"PRIX32")",
-- format_name ? format_name : "<unknown>", format->drm_format);
-- free(format_name);
-+ wlr_log(WLR_DEBUG, " %.4s (0x08%"PRIx32")",
-+ (const char *)&format->drm_format, format->drm_format);
-
- // get general features and modifiers
- VkFormatProperties2 fmtp = {0};
-diff --git a/types/output/render.c b/types/output/render.c
-index 13d714e1..862f67f5 100644
---- a/types/output/render.c
-+++ b/types/output/render.c
-@@ -4,7 +4,6 @@
- #include <wlr/interfaces/wlr_output.h>
- #include <wlr/render/interface.h>
- #include <wlr/util/log.h>
--#include <xf86drm.h>
- #include "backend/backend.h"
- #include "render/allocator/allocator.h"
- #include "render/drm_format_set.h"
-@@ -71,10 +70,8 @@ static bool output_create_swapchain(struct wlr_output *output,
- return true;
- }
-
-- char *format_name = drmGetFormatName(format->format);
-- wlr_log(WLR_DEBUG, "Choosing primary buffer format %s (0x%08"PRIX32")
for output '%s'",
-- format_name ? format_name : "<unknown>", format->format,
output->name);
-- free(format_name);
-+ wlr_log(WLR_DEBUG, "Choosing primary buffer format 0x%"PRIX32" for
output '%s'",
-+ format->format, output->name);
-
- if (!allow_modifiers && (format->len != 1 || format->modifiers[0] !=
DRM_FORMAT_MOD_LINEAR)) {
- if (!wlr_drm_format_has(format, DRM_FORMAT_MOD_INVALID)) {
---
-2.37.3
-
-
-From 99798f45c7a407c2a97c7ac2883c348b8e71c8c1 Mon Sep 17 00:00:00 2001
-From: Aleksei Bavshin <alebastr89(a)gmail.com>
-Date: Tue, 8 Nov 2022 18:37:51 -0800
-Subject: [PATCH 2/2] Compatibility with libdrm 2.4.109
-
----
- backend/drm/drm.c | 29 ++++++++++++++++++++---------
- backend/drm/util.c | 31 +++++++++++++++++++++++++++++++
- include/backend/drm/util.h | 2 ++
- meson.build | 2 +-
- 4 files changed, 54 insertions(+), 10 deletions(-)
-
-diff --git a/backend/drm/drm.c b/backend/drm/drm.c
-index 04994c68..9576de17 100644
---- a/backend/drm/drm.c
-+++ b/backend/drm/drm.c
-@@ -1141,6 +1141,23 @@ static struct wlr_drm_crtc *connector_get_current_crtc(
- return NULL;
- }
-
-+static uint32_t get_possible_crtcs(int fd, const drmModeConnector *conn) {
-+ uint32_t possible_crtcs = 0;
-+
-+ for (int i = 0; i < conn->count_encoders; ++i) {
-+ drmModeEncoder *enc = drmModeGetEncoder(fd, conn->encoders[i]);
-+ if (!enc) {
-+ continue;
-+ }
-+
-+ possible_crtcs |= enc->possible_crtcs;
-+
-+ drmModeFreeEncoder(enc);
-+ }
-+
-+ return possible_crtcs;
-+}
-+
- static struct wlr_drm_connector *create_drm_connector(struct wlr_drm_backend *drm,
- const drmModeConnector *drm_conn) {
- struct wlr_drm_connector *wlr_conn = calloc(1, sizeof(*wlr_conn));
-@@ -1153,17 +1170,11 @@ static struct wlr_drm_connector *create_drm_connector(struct
wlr_drm_backend *dr
- wlr_conn->status = DRM_MODE_DISCONNECTED;
- wlr_conn->id = drm_conn->connector_id;
-
-- const char *conn_name =
-- drmModeGetConnectorTypeName(drm_conn->connector_type);
-- if (conn_name == NULL) {
-- conn_name = "Unknown";
-- }
--
- snprintf(wlr_conn->name, sizeof(wlr_conn->name),
-- "%s-%"PRIu32, conn_name, drm_conn->connector_type_id);
-+ "%s-%"PRIu32, conn_get_name(drm_conn->connector_type),
-+ drm_conn->connector_type_id);
-
-- wlr_conn->possible_crtcs =
-- drmModeConnectorGetPossibleCrtcs(drm->fd, drm_conn);
-+ wlr_conn->possible_crtcs = get_possible_crtcs(drm->fd, drm_conn);
- if (wlr_conn->possible_crtcs == 0) {
- wlr_drm_conn_log(wlr_conn, WLR_ERROR, "No CRTC possible");
- }
-diff --git a/backend/drm/util.c b/backend/drm/util.c
-index 03c4b0b4..6e0df7c5 100644
---- a/backend/drm/util.c
-+++ b/backend/drm/util.c
-@@ -119,6 +119,37 @@ void parse_edid(struct wlr_drm_connector *conn, size_t len, const
uint8_t *data)
- }
- }
-
-+const char *conn_get_name(uint32_t type_id) {
-+ switch (type_id) {
-+ case DRM_MODE_CONNECTOR_Unknown: return "Unknown";
-+ case DRM_MODE_CONNECTOR_VGA: return "VGA";
-+ case DRM_MODE_CONNECTOR_DVII: return "DVI-I";
-+ case DRM_MODE_CONNECTOR_DVID: return "DVI-D";
-+ case DRM_MODE_CONNECTOR_DVIA: return "DVI-A";
-+ case DRM_MODE_CONNECTOR_Composite: return "Composite";
-+ case DRM_MODE_CONNECTOR_SVIDEO: return "SVIDEO";
-+ case DRM_MODE_CONNECTOR_LVDS: return "LVDS";
-+ case DRM_MODE_CONNECTOR_Component: return "Component";
-+ case DRM_MODE_CONNECTOR_9PinDIN: return "DIN";
-+ case DRM_MODE_CONNECTOR_DisplayPort: return "DP";
-+ case DRM_MODE_CONNECTOR_HDMIA: return "HDMI-A";
-+ case DRM_MODE_CONNECTOR_HDMIB: return "HDMI-B";
-+ case DRM_MODE_CONNECTOR_TV: return "TV";
-+ case DRM_MODE_CONNECTOR_eDP: return "eDP";
-+ case DRM_MODE_CONNECTOR_VIRTUAL: return "Virtual";
-+ case DRM_MODE_CONNECTOR_DSI: return "DSI";
-+ case DRM_MODE_CONNECTOR_DPI: return "DPI";
-+ case DRM_MODE_CONNECTOR_WRITEBACK: return "Writeback";
-+#ifdef DRM_MODE_CONNECTOR_SPI
-+ case DRM_MODE_CONNECTOR_SPI: return "SPI";
-+#endif
-+#ifdef DRM_MODE_CONNECTOR_USB
-+ case DRM_MODE_CONNECTOR_USB: return "USB";
-+#endif
-+ default: return "Unknown";
-+ }
-+}
-+
- static bool is_taken(size_t n, const uint32_t arr[static n], uint32_t key) {
- for (size_t i = 0; i < n; ++i) {
- if (arr[i] == key) {
-diff --git a/include/backend/drm/util.h b/include/backend/drm/util.h
-index 9bfe5f8a..4979d906 100644
---- a/include/backend/drm/util.h
-+++ b/include/backend/drm/util.h
-@@ -14,6 +14,8 @@ enum wlr_output_mode_aspect_ratio get_picture_aspect_ratio(const
drmModeModeInfo
- const char *get_pnp_manufacturer(uint16_t code);
- // Populates the make/model/phys_{width,height} of output from the edid data
- void parse_edid(struct wlr_drm_connector *conn, size_t len, const uint8_t *data);
-+// Returns the string representation of a DRM output type
-+const char *conn_get_name(uint32_t type_id);
-
- // Part of match_obj
- enum {
-diff --git a/meson.build b/meson.build
-index b2fbcf33..b673ab20 100644
---- a/meson.build
-+++ b/meson.build
-@@ -107,7 +107,7 @@ wayland_server = dependency('wayland-server',
- )
-
- drm = dependency('libdrm',
-- version: '>=2.4.112',
-+ version: '>=2.4.109',
- fallback: 'libdrm',
- default_options: [
- 'intel=disabled',
---
-2.37.3
-
diff --git a/wlroots.spec b/wlroots.spec
index 5833ca5..3369d1c 100644
--- a/wlroots.spec
+++ b/wlroots.spec
@@ -2,7 +2,7 @@
%global abi_ver 11
Name: wlroots
-Version: 0.16.0
+Version: 0.16.1
Release: 1%{?dist}
Summary: A modular Wayland compositor library
@@ -35,16 +35,11 @@ Source2:
https://emersion.fr/.well-known/openpgpkey/hu/dj3498u4hyyarh35rk
Source3: examples.meson.build
# Upstream patches
-# Backports for 0.16.1 bugfix release: git format-patch --stdout 0.16.0..0.16
-Patch0: wlroots-0.16-backports.patch
# Fedora patches
# Following patch is required for phoc.
Patch10: Revert-layer-shell-error-on-0-dimension-without-anch.patch
-# Patches for compatibility with older Fedora releases (module or copr builds)
-Patch20: wlroots-0.16-libdrm-2.4.109-compat.patch
-
BuildRequires: gcc
BuildRequires: glslang
BuildRequires: gnupg2
@@ -106,9 +101,6 @@ Development files for %{name}.
# apply unconditional patches
%autopatch -p1 -M19
# apply conditional patches
-%if 0%{?fedora} && 0%{?fedora} < 37
-%patch20 -p1 -b .libdrm
-%endif
%build
@@ -151,6 +143,9 @@ install -pm0644 -D '%{SOURCE3}'
'%{buildroot}/%{_pkgdocdir}/examples/meson.build
%changelog
+* Sun Dec 25 2022 Aleksei Bavshin <alebastr(a)fedoraproject.org> - 0.16.1-1
+- Update to 0.16.1
+
* Fri Dec 02 2022 Aleksei Bavshin <alebastr(a)fedoraproject.org> - 0.16.0-1
- Update to 0.16.0 (#2142159)
- Add patch for compatibility with older libdrm
commit 4a23fc87a59dad2f1c5a0a93d64c1dcc03ea369b
Author: Aleksei Bavshin <alebastr(a)fedoraproject.org>
Date: Fri Dec 2 22:07:00 2022 -0800
Sync examples.meson.build with upstream
Include all available examples
diff --git a/examples.meson.build b/examples.meson.build
index 41782c5..37b20e2 100644
--- a/examples.meson.build
+++ b/examples.meson.build
@@ -1,7 +1,7 @@
project(
'wlroots-examples',
'c',
- meson_version: '>=0.51.2',
+ meson_version: '>=0.58.0',
default_options: [
'c_std=c11',
'warning_level=2',
@@ -12,69 +12,304 @@ project(
cc = meson.get_compiler('c')
add_global_arguments('-DWLR_USE_UNSTABLE', language : 'c')
-wlroots = dependency('wlroots')
+math = cc.find_library('m')
+rt = cc.find_library('rt')
+
+threads = dependency('threads')
+wayland_egl = dependency('wayland-egl')
+wayland_cursor = dependency('wayland-cursor')
wayland_client = dependency('wayland-client')
wayland_server = dependency('wayland-server')
-glesv2 = dependency('glesv2')
+wayland_protos = dependency('wayland-protocols', version: '>=1.27')
+wayland_scanner_dep = dependency('wayland-scanner', native: true)
+wayland_scanner = find_program(
+ wayland_scanner_dep.get_variable('wayland_scanner'),
+ native: true,
+)
+wlroots = dependency('wlroots')
xkbcommon = dependency('xkbcommon')
-
-wlr_protos = dependency('wlroots')
-rt = cc.find_library('rt')
+libpng = dependency('libpng', required: false, disabler: true)
+drm = dependency('libdrm')
+egl = dependency('egl', required: false, disabler: true)
+glesv2 = dependency('glesv2', required: false, disabler: true)
+gbm = dependency('gbm', required: false, disabler: true)
+# These versions correspond to ffmpeg 4.0
+libavutil = dependency('libavutil', version: '>=56.14.100', required:
false, disabler: true)
+libavcodec = dependency('libavcodec', version: '>=58.18.100',
required: false, disabler: true)
+libavformat = dependency('libavformat', version: '>=58.12.100',
required: false, disabler: true)
+# Only needed for drm_fourcc.h
+libdrm = dependency('libdrm').partial_dependency(compile_args: true, includes:
true)
# epoll is a separate library in FreeBSD
if host_machine.system() == 'freebsd'
- libepoll = [dependency('epoll-shim')]
+ libepoll = dependency('epoll-shim')
else
- libepoll = []
+ libepoll = declare_dependency()
endif
-libpng = dependency('libpng', required: false, disabler: true)
+if not cc.has_header('libavutil/hwcontext_drm.h', dependencies: libavutil)
+ libavutil = disabler()
+endif
+
+wl_protocol_dir = wayland_protos.get_variable('pkgdatadir')
+wlr_protocol_dir = 'protocol'
+
+protocols = {
+ # Stable upstream protocols
+ 'xdg-shell': wl_protocol_dir / 'stable/xdg-shell/xdg-shell.xml',
+
+ # Unstable upstream protocols
+ 'fullscreen-shell-unstable-v1': wl_protocol_dir /
'unstable/fullscreen-shell/fullscreen-shell-unstable-v1.xml',
+ 'idle-inhibit-unstable-v1': wl_protocol_dir /
'unstable/idle-inhibit/idle-inhibit-unstable-v1.xml',
+ 'keyboard-shortcuts-inhibit-unstable-v1': wl_protocol_dir /
'unstable/keyboard-shortcuts-inhibit/keyboard-shortcuts-inhibit-unstable-v1.xml',
+ 'linux-dmabuf-unstable-v1': wl_protocol_dir /
'unstable/linux-dmabuf/linux-dmabuf-unstable-v1.xml',
+ 'pointer-constraints-unstable-v1': wl_protocol_dir /
'unstable/pointer-constraints/pointer-constraints-unstable-v1.xml',
+ 'relative-pointer-unstable-v1': wl_protocol_dir /
'unstable/relative-pointer/relative-pointer-unstable-v1.xml',
+ 'text-input-unstable-v3': wl_protocol_dir /
'unstable/text-input/text-input-unstable-v3.xml',
+ 'xdg-decoration-unstable-v1': wl_protocol_dir /
'unstable/xdg-decoration/xdg-decoration-unstable-v1.xml',
-examples = {
+ # Other protocols
+ 'input-method-unstable-v2': wlr_protocol_dir /
'input-method-unstable-v2.xml',
+ 'kde-idle': wlr_protocol_dir / 'idle.xml',
+ 'wlr-export-dmabuf-unstable-v1': wlr_protocol_dir /
'wlr-export-dmabuf-unstable-v1.xml',
+ 'wlr-foreign-toplevel-management-unstable-v1': wlr_protocol_dir /
'wlr-foreign-toplevel-management-unstable-v1.xml',
+ 'wlr-gamma-control-unstable-v1': wlr_protocol_dir /
'wlr-gamma-control-unstable-v1.xml',
+ 'wlr-input-inhibitor-unstable-v1': wlr_protocol_dir /
'wlr-input-inhibitor-unstable-v1.xml',
+ 'wlr-layer-shell-unstable-v1': wlr_protocol_dir /
'wlr-layer-shell-unstable-v1.xml',
+ 'wlr-output-power-management-unstable-v1': wlr_protocol_dir /
'wlr-output-power-management-unstable-v1.xml',
+ 'wlr-screencopy-unstable-v1': wlr_protocol_dir /
'wlr-screencopy-unstable-v1.xml',
+ 'wlr-virtual-pointer-unstable-v1': wlr_protocol_dir /
'wlr-virtual-pointer-unstable-v1.xml',
+}
+
+compositors = {
'simple': {
'src': 'simple.c',
- 'dep': [wlroots, wayland_server, glesv2, xkbcommon],
},
'pointer': {
'src': 'pointer.c',
- 'dep': [wlroots, wayland_server, xkbcommon],
},
'touch': {
'src': ['touch.c', 'cat.c'],
- 'dep': [wlroots, wayland_server, xkbcommon],
},
'tablet': {
'src': 'tablet.c',
- 'dep': [wlroots, wayland_server, xkbcommon],
},
'rotation': {
'src': ['rotation.c', 'cat.c'],
- 'dep': [wlroots, wayland_server, xkbcommon],
},
'multi-pointer': {
'src': 'multi-pointer.c',
- 'dep': [wlroots, wayland_server, glesv2, xkbcommon],
},
'output-layout': {
'src': ['output-layout.c', 'cat.c'],
- 'dep': [wlroots, wayland_server, xkbcommon],
+ },
+ 'fullscreen-shell': {
+ 'src': 'fullscreen-shell.c',
+ 'proto': ['fullscreen-shell-unstable-v1'],
+ },
+ 'quads': {
+ 'src': 'quads.c',
+ },
+ 'scene-graph': {
+ 'src': 'scene-graph.c',
+ 'proto': ['xdg-shell'],
+ },
+}
+
+clients = {
+ 'idle': {
+ 'src': 'idle.c',
+ 'dep': [threads],
+ 'proto': ['kde-idle'],
+ },
+ 'idle-inhibit': {
+ 'src': ['idle-inhibit.c', 'egl_common.c'],
+ 'dep': [wayland_egl, egl, glesv2],
+ 'proto': [
+ 'idle-inhibit-unstable-v1',
+ 'xdg-shell',
+ ],
+ },
+ 'keyboard-shortcuts-inhibit': {
+ 'src': ['keyboard-shortcuts-inhibit.c', 'egl_common.c'],
+ 'dep': [wayland_egl, wayland_cursor, egl, glesv2],
+ 'proto': [
+ 'keyboard-shortcuts-inhibit-unstable-v1',
+ 'xdg-shell',
+ ],
+ },
+ 'layer-shell': {
+ 'src': ['layer-shell.c', 'egl_common.c'],
+ 'dep': [wayland_egl, wayland_cursor, egl, glesv2],
+ 'proto': [
+ 'wlr-layer-shell-unstable-v1',
+ 'xdg-shell',
+ ],
+ },
+ 'input-inhibitor': {
+ 'src': ['input-inhibitor.c', 'egl_common.c'],
+ 'dep': [wayland_egl, wayland_cursor, egl, glesv2],
+ 'proto': [
+ 'wlr-input-inhibitor-unstable-v1',
+ 'xdg-shell',
+ ],
+ },
+ 'gamma-control': {
+ 'src': 'gamma-control.c',
+ 'dep': [wayland_cursor, math],
+ 'proto': ['wlr-gamma-control-unstable-v1'],
+ },
+ 'output-power-management': {
+ 'src': 'output-power-management.c',
+ 'dep': [wayland_client],
+ 'proto': ['wlr-output-power-management-unstable-v1'],
+ },
+ 'pointer-constraints': {
+ 'src': ['pointer-constraints.c', 'egl_common.c'],
+ 'dep': [wayland_egl, egl, glesv2],
+ 'proto': [
+ 'pointer-constraints-unstable-v1',
+ 'xdg-shell',
+ ],
+ },
+ 'relative-pointer': {
+ 'src': ['relative-pointer-unstable-v1.c', 'egl_common.c'],
+ 'dep': [wayland_egl, egl, glesv2],
+ 'proto': [
+ 'pointer-constraints-unstable-v1',
+ 'relative-pointer-unstable-v1',
+ 'xdg-shell',
+ ],
+ },
+ 'dmabuf-capture': {
+ 'src': 'dmabuf-capture.c',
+ 'dep': [
+ libavcodec,
+ libavformat,
+ libavutil,
+ drm,
+ threads,
+ ],
+ 'proto': ['wlr-export-dmabuf-unstable-v1'],
},
'screencopy': {
'src': 'screencopy.c',
- 'dep': [libpng, wayland_client, wlr_protos, rt],
+ 'dep': [libpng, rt],
+ 'proto': ['wlr-screencopy-unstable-v1'],
+ },
+ 'screencopy-dmabuf': {
+ 'src': 'screencopy-dmabuf.c',
+ 'dep': [libpng, rt, gbm, drm],
+ 'proto': [
+ 'wlr-screencopy-unstable-v1',
+ 'linux-dmabuf-unstable-v1',
+ ],
+ },
+ 'toplevel-decoration': {
+ 'src': ['toplevel-decoration.c', 'egl_common.c'],
+ 'dep': [wayland_egl, egl, glesv2],
+ 'proto': [
+ 'xdg-decoration-unstable-v1',
+ 'xdg-shell',
+ ],
+ },
+ 'input-method': {
+ 'src': 'input-method.c',
+ 'dep': [wayland_egl, libepoll],
+ 'proto': [
+ 'input-method-unstable-v2',
+ 'text-input-unstable-v3',
+ 'xdg-shell',
+ ],
+ },
+ 'text-input': {
+ 'src': ['text-input.c', 'egl_common.c'],
+ 'dep': [wayland_egl, wayland_cursor, egl, glesv2],
+ 'proto': [
+ 'text-input-unstable-v3',
+ 'xdg-shell',
+ ],
+ },
+ 'foreign-toplevel': {
+ 'src': 'foreign-toplevel.c',
+ 'proto': ['wlr-foreign-toplevel-management-unstable-v1'],
+ },
+ 'virtual-pointer': {
+ 'src': 'virtual-pointer.c',
+ 'proto': ['wlr-virtual-pointer-unstable-v1'],
+ },
+ 'input-method-keyboard-grab': {
+ 'src': 'input-method-keyboard-grab.c',
+ 'dep': [xkbcommon],
+ 'proto': [
+ 'input-method-unstable-v2',
+ ],
},
}
-foreach name, info : examples
+protocols_code = {}
+protocols_server_header = {}
+protocols_client_header = {}
+proto_inc = include_directories('protocol')
+
+foreach name, path : protocols
+ code = custom_target(
+ name.underscorify() + '_c',
+ input: path,
+ output: '@BASENAME(a)-protocol.c',
+ command: [wayland_scanner, 'private-code', '@INPUT@',
'@OUTPUT@'],
+ )
+
+ server_header = custom_target(
+ name.underscorify() + '_server_h',
+ input: path,
+ output: '@BASENAME(a)-protocol.h',
+ command: [wayland_scanner, 'server-header', '@INPUT@',
'@OUTPUT@'],
+ )
+
+ client_header = custom_target(
+ name.underscorify() + '_client_h',
+ input: path,
+ output: '@BASENAME(a)-client-protocol.h',
+ command: [wayland_scanner, 'client-header', '@INPUT@',
'@OUTPUT@'],
+ build_by_default: false,
+ )
+
+ protocols_code += { name: code }
+ protocols_server_header += { name: server_header }
+ protocols_client_header += { name: client_header }
+endforeach
+
+foreach name, info : compositors
+ extra_src = []
+ foreach p : info.get('proto', [])
+ extra_src += protocols_server_header[p]
+ endforeach
+
+ executable(
+ name,
+ [info.get('src'), extra_src],
+ dependencies: [libdrm, wlroots, wayland_server, xkbcommon],
+ include_directories: [proto_inc],
+ )
+endforeach
+
+foreach name, info : clients
all_dep_found = true
- foreach d : info.get('dep')
+ extra_src = []
+ foreach d : info.get('dep', [])
all_dep_found = all_dep_found and d.found()
endforeach
+ foreach p : info.get('proto')
+ extra_src += protocols_code[p]
+ extra_src += protocols_client_header[p]
+ endforeach
+
if all_dep_found
executable(
name,
- info.get('src'),
- dependencies: info.get('dep'),
+ [info.get('src'), extra_src],
+ dependencies: [wayland_client, info.get('dep', [])],
)
else
warning('Dependencies not satisfied for ' + name)
diff --git a/wlroots.spec b/wlroots.spec
index 453cb67..5833ca5 100644
--- a/wlroots.spec
+++ b/wlroots.spec
@@ -70,9 +70,13 @@ BuildRequires: pkgconfig(xcb-renderutil)
BuildRequires: pkgconfig(xkbcommon)
BuildRequires: pkgconfig(xwayland)
-# only select examples are supported for being readily compilable (see SOURCE3)
-%global examples \
- cat multi-pointer output-layout pointer rotation screencopy simple tablet touch
+# protocol files required to compile examples (see SOURCE3)
+%global example_protocols \
+ idle input-method-unstable-v2 wlr-export-dmabuf-unstable-v1 \
+ wlr-foreign-toplevel-management-unstable-v1 wlr-gamma-control-unstable-v1 \
+ wlr-input-inhibitor-unstable-v1 wlr-layer-shell-unstable-v1 \
+ wlr-output-power-management-unstable-v1 wlr-screencopy-unstable-v1 \
+ wlr-virtual-pointer-unstable-v1
%description
%{summary}.
@@ -85,8 +89,12 @@ Requires: %{name}%{?_isa} == %{version}-%{release}
Recommends: pkgconfig(xcb-icccm)
# for examples
Suggests: gcc
-Suggests: meson >= 0.51.2
+Suggests: meson >= 0.58.0
Suggests: pkgconfig(libpng)
+Suggests: pkgconfig(libavutil)
+Suggests: pkgconfig(libavcodec)
+Suggests: pkgconfig(libavformat)
+Suggests: pkgconfig(wayland-egl)
%description devel
Development files for %{name}.
@@ -117,9 +125,10 @@ MESON_OPTIONS=(
%install
%{meson_install}
-EXAMPLES=( %{examples} ) # Normalize whitespace by creating an array
-for example in "${EXAMPLES[@]}"; do
- install -pm0644 -Dt '%{buildroot}/%{_pkgdocdir}/examples'
examples/"${example}".[ch]
+EXAMPLE_PROTOCOLS=( %{example_protocols} ) # Normalize whitespace by creating an array
+install -pm0644 -Dt '%{buildroot}/%{_pkgdocdir}/examples' examples/*.[ch]
+for proto in "${EXAMPLE_PROTOCOLS[@]}"; do
+ install -pm0644 -Dt '%{buildroot}/%{_pkgdocdir}/examples/protocol'
"protocol/${proto}.xml"
done
install -pm0644 -D '%{SOURCE3}'
'%{buildroot}/%{_pkgdocdir}/examples/meson.build'
@@ -145,6 +154,7 @@ install -pm0644 -D '%{SOURCE3}'
'%{buildroot}/%{_pkgdocdir}/examples/meson.build
* Fri Dec 02 2022 Aleksei Bavshin <alebastr(a)fedoraproject.org> - 0.16.0-1
- Update to 0.16.0 (#2142159)
- Add patch for compatibility with older libdrm
+- Sync examples.meson.build with upstream, include all available examples
* Mon Nov 14 2022 Aleksei Bavshin <alebastr(a)fedoraproject.org> - 0.15.1-5
- Backport upstream crash fix (#2142447)
commit 83a52a28622c782b40ddd68d0ccf5ca39fe5c056
Author: Aleksei Bavshin <alebastr(a)fedoraproject.org>
Date: Fri Dec 2 22:06:59 2022 -0800
Add patch for compatibility with older libdrm
diff --git a/wlroots-0.16-libdrm-2.4.109-compat.patch
b/wlroots-0.16-libdrm-2.4.109-compat.patch
new file mode 100644
index 0000000..997cf49
--- /dev/null
+++ b/wlroots-0.16-libdrm-2.4.109-compat.patch
@@ -0,0 +1,241 @@
+From 05ec8d7a160aa5fb1a7fb47c6711e3e95348fbf7 Mon Sep 17 00:00:00 2001
+From: Aleksei Bavshin <alebastr89(a)gmail.com>
+Date: Tue, 8 Nov 2022 18:37:13 -0800
+Subject: [PATCH 1/2] Compatibility with libdrm 2.4.112
+
+---
+ meson.build | 2 +-
+ render/allocator/gbm.c | 7 ++-----
+ render/egl.c | 5 +----
+ render/vulkan/pixel_format.c | 6 ++----
+ types/output/render.c | 7 ++-----
+ 5 files changed, 8 insertions(+), 19 deletions(-)
+
+diff --git a/meson.build b/meson.build
+index 5dd38e1a..b2fbcf33 100644
+--- a/meson.build
++++ b/meson.build
+@@ -107,7 +107,7 @@ wayland_server = dependency('wayland-server',
+ )
+
+ drm = dependency('libdrm',
+- version: '>=2.4.113',
++ version: '>=2.4.112',
+ fallback: 'libdrm',
+ default_options: [
+ 'intel=disabled',
+diff --git a/render/allocator/gbm.c b/render/allocator/gbm.c
+index f77fedd8..805d80e3 100644
+--- a/render/allocator/gbm.c
++++ b/render/allocator/gbm.c
+@@ -138,14 +138,11 @@ static struct wlr_gbm_buffer *create_buffer(struct
wlr_gbm_allocator *alloc,
+ buffer->dmabuf.modifier = fallback_modifier;
+ }
+
+- char *format_name = drmGetFormatName(buffer->dmabuf.format);
+ char *modifier_name = drmGetFormatModifierName(buffer->dmabuf.modifier);
+ wlr_log(WLR_DEBUG, "Allocated %dx%d GBM buffer "
+- "with format %s (0x%08"PRIX32"), modifier %s
(0x%016"PRIX64")",
+- buffer->base.width, buffer->base.height,
+- format_name ? format_name : "<unknown>", buffer->dmabuf.format,
++ "with format 0x%08"PRIX32", modifier %s
(0x%016"PRIX64")",
++ buffer->base.width, buffer->base.height, buffer->dmabuf.format,
+ modifier_name ? modifier_name : "<unknown>",
buffer->dmabuf.modifier);
+- free(format_name);
+ free(modifier_name);
+
+ return buffer;
+diff --git a/render/egl.c b/render/egl.c
+index e3839c7d..13068fe2 100644
+--- a/render/egl.c
++++ b/render/egl.c
+@@ -161,10 +161,7 @@ static void init_dmabuf_formats(struct wlr_egl *egl) {
+ }
+
+ if (wlr_log_get_verbosity() >= WLR_DEBUG) {
+- char *fmt_name = drmGetFormatName(fmt);
+- wlr_log(WLR_DEBUG, " %s (0x%08"PRIX32")",
+- fmt_name ? fmt_name : "<unknown>", fmt);
+- free(fmt_name);
++ wlr_log(WLR_DEBUG, " 0x%08"PRIX32"", fmt);
+
+ log_modifier(DRM_FORMAT_MOD_INVALID, false);
+ if (modifiers_len == 0) {
+diff --git a/render/vulkan/pixel_format.c b/render/vulkan/pixel_format.c
+index f55063d7..d0008648 100644
+--- a/render/vulkan/pixel_format.c
++++ b/render/vulkan/pixel_format.c
+@@ -234,10 +234,8 @@ void vulkan_format_props_query(struct wlr_vk_device *dev,
+ const struct wlr_vk_format *format) {
+ VkResult res;
+
+- char *format_name = drmGetFormatName(format->drm_format);
+- wlr_log(WLR_DEBUG, " %s (0x%08"PRIX32")",
+- format_name ? format_name : "<unknown>", format->drm_format);
+- free(format_name);
++ wlr_log(WLR_DEBUG, " %.4s (0x08%"PRIx32")",
++ (const char *)&format->drm_format, format->drm_format);
+
+ // get general features and modifiers
+ VkFormatProperties2 fmtp = {0};
+diff --git a/types/output/render.c b/types/output/render.c
+index 13d714e1..862f67f5 100644
+--- a/types/output/render.c
++++ b/types/output/render.c
+@@ -4,7 +4,6 @@
+ #include <wlr/interfaces/wlr_output.h>
+ #include <wlr/render/interface.h>
+ #include <wlr/util/log.h>
+-#include <xf86drm.h>
+ #include "backend/backend.h"
+ #include "render/allocator/allocator.h"
+ #include "render/drm_format_set.h"
+@@ -71,10 +70,8 @@ static bool output_create_swapchain(struct wlr_output *output,
+ return true;
+ }
+
+- char *format_name = drmGetFormatName(format->format);
+- wlr_log(WLR_DEBUG, "Choosing primary buffer format %s (0x%08"PRIX32")
for output '%s'",
+- format_name ? format_name : "<unknown>", format->format,
output->name);
+- free(format_name);
++ wlr_log(WLR_DEBUG, "Choosing primary buffer format 0x%"PRIX32" for
output '%s'",
++ format->format, output->name);
+
+ if (!allow_modifiers && (format->len != 1 || format->modifiers[0] !=
DRM_FORMAT_MOD_LINEAR)) {
+ if (!wlr_drm_format_has(format, DRM_FORMAT_MOD_INVALID)) {
+--
+2.37.3
+
+
+From 99798f45c7a407c2a97c7ac2883c348b8e71c8c1 Mon Sep 17 00:00:00 2001
+From: Aleksei Bavshin <alebastr89(a)gmail.com>
+Date: Tue, 8 Nov 2022 18:37:51 -0800
+Subject: [PATCH 2/2] Compatibility with libdrm 2.4.109
+
+---
+ backend/drm/drm.c | 29 ++++++++++++++++++++---------
+ backend/drm/util.c | 31 +++++++++++++++++++++++++++++++
+ include/backend/drm/util.h | 2 ++
+ meson.build | 2 +-
+ 4 files changed, 54 insertions(+), 10 deletions(-)
+
+diff --git a/backend/drm/drm.c b/backend/drm/drm.c
+index 04994c68..9576de17 100644
+--- a/backend/drm/drm.c
++++ b/backend/drm/drm.c
+@@ -1141,6 +1141,23 @@ static struct wlr_drm_crtc *connector_get_current_crtc(
+ return NULL;
+ }
+
++static uint32_t get_possible_crtcs(int fd, const drmModeConnector *conn) {
++ uint32_t possible_crtcs = 0;
++
++ for (int i = 0; i < conn->count_encoders; ++i) {
++ drmModeEncoder *enc = drmModeGetEncoder(fd, conn->encoders[i]);
++ if (!enc) {
++ continue;
++ }
++
++ possible_crtcs |= enc->possible_crtcs;
++
++ drmModeFreeEncoder(enc);
++ }
++
++ return possible_crtcs;
++}
++
+ static struct wlr_drm_connector *create_drm_connector(struct wlr_drm_backend *drm,
+ const drmModeConnector *drm_conn) {
+ struct wlr_drm_connector *wlr_conn = calloc(1, sizeof(*wlr_conn));
+@@ -1153,17 +1170,11 @@ static struct wlr_drm_connector *create_drm_connector(struct
wlr_drm_backend *dr
+ wlr_conn->status = DRM_MODE_DISCONNECTED;
+ wlr_conn->id = drm_conn->connector_id;
+
+- const char *conn_name =
+- drmModeGetConnectorTypeName(drm_conn->connector_type);
+- if (conn_name == NULL) {
+- conn_name = "Unknown";
+- }
+-
+ snprintf(wlr_conn->name, sizeof(wlr_conn->name),
+- "%s-%"PRIu32, conn_name, drm_conn->connector_type_id);
++ "%s-%"PRIu32, conn_get_name(drm_conn->connector_type),
++ drm_conn->connector_type_id);
+
+- wlr_conn->possible_crtcs =
+- drmModeConnectorGetPossibleCrtcs(drm->fd, drm_conn);
++ wlr_conn->possible_crtcs = get_possible_crtcs(drm->fd, drm_conn);
+ if (wlr_conn->possible_crtcs == 0) {
+ wlr_drm_conn_log(wlr_conn, WLR_ERROR, "No CRTC possible");
+ }
+diff --git a/backend/drm/util.c b/backend/drm/util.c
+index 03c4b0b4..6e0df7c5 100644
+--- a/backend/drm/util.c
++++ b/backend/drm/util.c
+@@ -119,6 +119,37 @@ void parse_edid(struct wlr_drm_connector *conn, size_t len, const
uint8_t *data)
+ }
+ }
+
++const char *conn_get_name(uint32_t type_id) {
++ switch (type_id) {
++ case DRM_MODE_CONNECTOR_Unknown: return "Unknown";
++ case DRM_MODE_CONNECTOR_VGA: return "VGA";
++ case DRM_MODE_CONNECTOR_DVII: return "DVI-I";
++ case DRM_MODE_CONNECTOR_DVID: return "DVI-D";
++ case DRM_MODE_CONNECTOR_DVIA: return "DVI-A";
++ case DRM_MODE_CONNECTOR_Composite: return "Composite";
++ case DRM_MODE_CONNECTOR_SVIDEO: return "SVIDEO";
++ case DRM_MODE_CONNECTOR_LVDS: return "LVDS";
++ case DRM_MODE_CONNECTOR_Component: return "Component";
++ case DRM_MODE_CONNECTOR_9PinDIN: return "DIN";
++ case DRM_MODE_CONNECTOR_DisplayPort: return "DP";
++ case DRM_MODE_CONNECTOR_HDMIA: return "HDMI-A";
++ case DRM_MODE_CONNECTOR_HDMIB: return "HDMI-B";
++ case DRM_MODE_CONNECTOR_TV: return "TV";
++ case DRM_MODE_CONNECTOR_eDP: return "eDP";
++ case DRM_MODE_CONNECTOR_VIRTUAL: return "Virtual";
++ case DRM_MODE_CONNECTOR_DSI: return "DSI";
++ case DRM_MODE_CONNECTOR_DPI: return "DPI";
++ case DRM_MODE_CONNECTOR_WRITEBACK: return "Writeback";
++#ifdef DRM_MODE_CONNECTOR_SPI
++ case DRM_MODE_CONNECTOR_SPI: return "SPI";
++#endif
++#ifdef DRM_MODE_CONNECTOR_USB
++ case DRM_MODE_CONNECTOR_USB: return "USB";
++#endif
++ default: return "Unknown";
++ }
++}
++
+ static bool is_taken(size_t n, const uint32_t arr[static n], uint32_t key) {
+ for (size_t i = 0; i < n; ++i) {
+ if (arr[i] == key) {
+diff --git a/include/backend/drm/util.h b/include/backend/drm/util.h
+index 9bfe5f8a..4979d906 100644
+--- a/include/backend/drm/util.h
++++ b/include/backend/drm/util.h
+@@ -14,6 +14,8 @@ enum wlr_output_mode_aspect_ratio get_picture_aspect_ratio(const
drmModeModeInfo
+ const char *get_pnp_manufacturer(uint16_t code);
+ // Populates the make/model/phys_{width,height} of output from the edid data
+ void parse_edid(struct wlr_drm_connector *conn, size_t len, const uint8_t *data);
++// Returns the string representation of a DRM output type
++const char *conn_get_name(uint32_t type_id);
+
+ // Part of match_obj
+ enum {
+diff --git a/meson.build b/meson.build
+index b2fbcf33..b673ab20 100644
+--- a/meson.build
++++ b/meson.build
+@@ -107,7 +107,7 @@ wayland_server = dependency('wayland-server',
+ )
+
+ drm = dependency('libdrm',
+- version: '>=2.4.112',
++ version: '>=2.4.109',
+ fallback: 'libdrm',
+ default_options: [
+ 'intel=disabled',
+--
+2.37.3
+
diff --git a/wlroots.spec b/wlroots.spec
index d57bcc8..453cb67 100644
--- a/wlroots.spec
+++ b/wlroots.spec
@@ -42,6 +42,9 @@ Patch0: wlroots-0.16-backports.patch
# Following patch is required for phoc.
Patch10: Revert-layer-shell-error-on-0-dimension-without-anch.patch
+# Patches for compatibility with older Fedora releases (module or copr builds)
+Patch20: wlroots-0.16-libdrm-2.4.109-compat.patch
+
BuildRequires: gcc
BuildRequires: glslang
BuildRequires: gnupg2
@@ -50,7 +53,7 @@ BuildRequires: pkgconfig(egl)
BuildRequires: pkgconfig(gbm) >= 17.1.0
BuildRequires: pkgconfig(glesv2)
BuildRequires: pkgconfig(hwdata)
-BuildRequires: pkgconfig(libdrm) >= 2.4.113
+BuildRequires: pkgconfig(libdrm) >= 2.4.109 %dnl # 2.4.113 without the compat
patch
BuildRequires: pkgconfig(libinput) >= 1.21.0
BuildRequires: pkgconfig(libseat)
BuildRequires: pkgconfig(libudev)
@@ -91,7 +94,13 @@ Development files for %{name}.
%prep
%{gpgverify} --keyring='%{SOURCE2}' --signature='%{SOURCE1}'
--data='%{SOURCE0}'
-%autosetup -p1
+%autosetup -N
+# apply unconditional patches
+%autopatch -p1 -M19
+# apply conditional patches
+%if 0%{?fedora} && 0%{?fedora} < 37
+%patch20 -p1 -b .libdrm
+%endif
%build
@@ -135,6 +144,7 @@ install -pm0644 -D '%{SOURCE3}'
'%{buildroot}/%{_pkgdocdir}/examples/meson.build
%changelog
* Fri Dec 02 2022 Aleksei Bavshin <alebastr(a)fedoraproject.org> - 0.16.0-1
- Update to 0.16.0 (#2142159)
+- Add patch for compatibility with older libdrm
* Mon Nov 14 2022 Aleksei Bavshin <alebastr(a)fedoraproject.org> - 0.15.1-5
- Backport upstream crash fix (#2142447)
commit 3993c57fb93fec57cecccb0371426df9ba84713a
Author: Aleksei Bavshin <alebastr(a)fedoraproject.org>
Date: Fri Dec 2 22:05:54 2022 -0800
Update to 0.16.0 (#2142159)
diff --git a/Revert-layer-shell-error-on-0-dimension-without-anch.patch
b/Revert-layer-shell-error-on-0-dimension-without-anch.patch
index b993126..430fb55 100644
--- a/Revert-layer-shell-error-on-0-dimension-without-anch.patch
+++ b/Revert-layer-shell-error-on-0-dimension-without-anch.patch
@@ -1,8 +1,7 @@
-From d5599fca9bdc4580929f904e21b6bc89e3ce8120 Mon Sep 17 00:00:00 2001
+From 05a740206a73c6aab3762eb449b0733e5b9a4c7a Mon Sep 17 00:00:00 2001
From: Aleksei Bavshin <alebastr89(a)gmail.com>
Date: Sat, 25 Jun 2022 21:22:08 -0700
-Subject: [PATCH 1/3] Revert "layer-shell: error on 0 dimension without
- anchors"
+Subject: [PATCH] Revert "layer-shell: error on 0 dimension without anchors"
This reverts commit 8dec751a6d84335fb04288b8efab6dd5c90288d3.
---
@@ -10,12 +9,12 @@ This reverts commit 8dec751a6d84335fb04288b8efab6dd5c90288d3.
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
+index fa054d3c..062fa96d 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;
- }
+@@ -316,26 +316,6 @@ static void layer_surface_role_commit(struct wlr_surface
*wlr_surface) {
+ struct wlr_layer_surface_v1 *surface =
+ wlr_layer_surface_v1_from_wlr_surface(wlr_surface);
- const uint32_t horiz = ZWLR_LAYER_SURFACE_V1_ANCHOR_LEFT |
- ZWLR_LAYER_SURFACE_V1_ANCHOR_RIGHT;
@@ -41,5 +40,5 @@ index 456dbc0e..55a6cfb8 100644
surface->pending.committed = 0;
--
-2.36.0
+2.37.3
diff --git a/sources b/sources
index 4500362..12a60d6 100644
--- a/sources
+++ b/sources
@@ -1,2 +1,2 @@
-SHA512 (wlroots-0.15.1.tar.gz) =
6228160f2f350a406c612f1048d7075cf2f78206cc84bc16f889d5d0acd614f9e98845fffed03d7067cfdbd7558b77fcc5d8cedc3868d866e476523126a63677
-SHA512 (wlroots-0.15.1.tar.gz.sig) =
c264274b132307276395648e7bfc2cd7d9061cd0f1bd4f5cb3a9acf859aeca536b1c57611adfaa9bf7334095e34df4e42253ba37fa30ae76a0df0a9e7091dfa3
+SHA512 (wlroots-0.16.0.tar.gz) =
f5a7ea444f77ec563a4cf40831c43fbe8593a61a31cc9e04f45abf0603d9dab11b90e0f7cda0cd65df40c36257377c101bbbd9e4cb9dd5cde0baa7abb558cc87
+SHA512 (wlroots-0.16.0.tar.gz.sig) =
98d0579f8a4b863f2c57cfcd9849811ac2bf5945b5b2511c7e1eb4f73e5db8af02265e9fa2e5b3330af141506b1d4e3c22a35cd8669ebd5633388e3c6bc5d2d3
diff --git a/wlroots-0.15.1-wlr_output_commit_state-Make-sure-to-clear-the-back-.patch
b/wlroots-0.15.1-wlr_output_commit_state-Make-sure-to-clear-the-back-.patch
deleted file mode 100644
index 427866b..0000000
--- a/wlroots-0.15.1-wlr_output_commit_state-Make-sure-to-clear-the-back-.patch
+++ /dev/null
@@ -1,30 +0,0 @@
-From 55c4ffae659ccd15ba40ec9355fcdc2bb68c32b7 Mon Sep 17 00:00:00 2001
-From: Alexander Orzechowski <orzechowski.alexander(a)gmail.com>
-Date: Sat, 4 Jun 2022 18:18:02 -0400
-Subject: [PATCH] wlr_output_commit_state: Make sure to clear the back buffer
-
-Fixes: #3445
----
- types/output/output.c | 2 ++
- 1 file changed, 2 insertions(+)
-
-diff --git a/types/output/output.c b/types/output/output.c
-index 85590ab6..4cf0fa8f 100644
---- a/types/output/output.c
-+++ b/types/output/output.c
-@@ -654,10 +654,12 @@ bool wlr_output_test(struct wlr_output *output) {
- bool wlr_output_commit(struct wlr_output *output) {
- if (!output_basic_test(output)) {
- wlr_log(WLR_ERROR, "Basic output test failed for %s", output->name);
-+ output_clear_back_buffer(output);
- return false;
- }
-
- if (!output_ensure_buffer(output)) {
-+ output_clear_back_buffer(output);
- return false;
- }
-
---
-2.37.3
-
diff --git a/wlroots-0.15.1-wlr_output_layout_contains_point-handle-outputs-that.patch
b/wlroots-0.15.1-wlr_output_layout_contains_point-handle-outputs-that.patch
deleted file mode 100644
index 8eb3f66..0000000
--- a/wlroots-0.15.1-wlr_output_layout_contains_point-handle-outputs-that.patch
+++ /dev/null
@@ -1,32 +0,0 @@
-From 637f12cefc0cd114d86402e793776526fdd66c2e Mon Sep 17 00:00:00 2001
-From: Sebastian Krzyszkowiak <dos(a)dosowisko.net>
-Date: Sat, 5 Mar 2022 08:00:39 +0100
-Subject: [PATCH 2/3] wlr_output_layout_contains_point: handle outputs that
- aren't in the layout
-
-Instead of crashing, return `false` when the specified output isn't part
-of the layout, as we can be sure that it doesn't contain the specified
-point.
-
-(cherry picked from commit 13fcdba75cf5f21cfd49c1a05f4fa62f77619b40)
----
- types/wlr_output_layout.c | 3 +++
- 1 file changed, 3 insertions(+)
-
-diff --git a/types/wlr_output_layout.c b/types/wlr_output_layout.c
-index eb672f06..f0f546da 100644
---- a/types/wlr_output_layout.c
-+++ b/types/wlr_output_layout.c
-@@ -242,6 +242,9 @@ bool wlr_output_layout_contains_point(struct wlr_output_layout
*layout,
- if (reference) {
- struct wlr_output_layout_output *l_output =
- wlr_output_layout_get(layout, reference);
-+ if (!l_output) {
-+ return false;
-+ }
- struct wlr_box *box = output_layout_output_get_box(l_output);
- return wlr_box_contains_point(box, lx, ly);
- } else {
---
-2.36.0
-
diff --git a/wlroots-0.15.1-xdg-activation-Deduplicate-token-creation-code.patch
b/wlroots-0.15.1-xdg-activation-Deduplicate-token-creation-code.patch
deleted file mode 100644
index 3222c90..0000000
--- a/wlroots-0.15.1-xdg-activation-Deduplicate-token-creation-code.patch
+++ /dev/null
@@ -1,108 +0,0 @@
-From eed77e4735557eb829aebb82bb8cea9fa0631d6f Mon Sep 17 00:00:00 2001
-From: =?UTF-8?q?Guido=20G=C3=BCnther?= <agx(a)sigxcpu.org>
-Date: Fri, 25 Mar 2022 18:48:58 +0100
-Subject: [PATCH 3/3] xdg-activation: Deduplicate token creation code
-
-There were three places initializing a token:
-
-- wlr_xdg_activation_v1_add_token
-- wlr_xdg_activation_token_v1_create
-- activation_handle_get_activation_token
-
-The initialization of the token.destroy was missing in the first one. To
-prevent these functions from getting out of sync move the token creation
-into a common function.
-
-Fixes 4c59f7d4 ("xdg-activation: Allow to submit tokens")
-
-(cherry picked from commit dd03d839ab56c3e5d7c607a8d76e58e0b75edb85)
----
- types/wlr_xdg_activation_v1.c | 42 +++++++++++++++++------------------
- 1 file changed, 20 insertions(+), 22 deletions(-)
-
-diff --git a/types/wlr_xdg_activation_v1.c b/types/wlr_xdg_activation_v1.c
-index 208ada28..b610fe17 100644
---- a/types/wlr_xdg_activation_v1.c
-+++ b/types/wlr_xdg_activation_v1.c
-@@ -248,15 +248,11 @@ static void activation_handle_destroy(struct wl_client *client,
- wl_resource_destroy(activation_resource);
- }
-
--static void activation_handle_get_activation_token(struct wl_client *client,
-- struct wl_resource *activation_resource, uint32_t id) {
-- struct wlr_xdg_activation_v1 *activation =
-- activation_from_resource(activation_resource);
--
-+static struct wlr_xdg_activation_token_v1 *activation_token_create(
-+ struct wlr_xdg_activation_v1 *activation) {
- struct wlr_xdg_activation_token_v1 *token = calloc(1, sizeof(*token));
- if (token == NULL) {
-- wl_client_post_no_memory(client);
-- return;
-+ return NULL;
- }
- wl_list_init(&token->link);
- wl_list_init(&token->seat_destroy.link);
-@@ -265,6 +261,20 @@ static void activation_handle_get_activation_token(struct wl_client
*client,
-
- token->activation = activation;
-
-+ return token;
-+}
-+
-+static void activation_handle_get_activation_token(struct wl_client *client,
-+ struct wl_resource *activation_resource, uint32_t id) {
-+ struct wlr_xdg_activation_v1 *activation =
-+ activation_from_resource(activation_resource);
-+
-+ struct wlr_xdg_activation_token_v1 *token = activation_token_create(activation);
-+ if (token == NULL) {
-+ wl_client_post_no_memory(client);
-+ return;
-+ }
-+
- uint32_t version = wl_resource_get_version(activation_resource);
- token->resource = wl_resource_create(client,
- &xdg_activation_token_v1_interface, version, id);
-@@ -371,19 +381,12 @@ struct wlr_xdg_activation_v1 *wlr_xdg_activation_v1_create(
-
- struct wlr_xdg_activation_token_v1 *wlr_xdg_activation_token_v1_create(
- struct wlr_xdg_activation_v1 *activation) {
-- struct wlr_xdg_activation_token_v1 *token = calloc(1, sizeof(*token));
-+ struct wlr_xdg_activation_token_v1 *token = activation_token_create(activation);
-+
- if (token == NULL) {
- return NULL;
- }
-
-- wl_list_init(&token->link);
-- // Currently no way to set seat/surface
-- wl_list_init(&token->seat_destroy.link);
-- wl_list_init(&token->surface_destroy.link);
-- wl_signal_init(&token->events.destroy);
--
-- token->activation = activation;
--
- if (!token_init(token)) {
- wlr_xdg_activation_token_v1_destroy(token);
- return NULL;
-@@ -412,15 +415,10 @@ struct wlr_xdg_activation_token_v1
*wlr_xdg_activation_v1_add_token(
- struct wlr_xdg_activation_v1 *activation, const char *token_str) {
- assert(token_str);
-
-- struct wlr_xdg_activation_token_v1 *token = calloc(1, sizeof(*token));
-+ struct wlr_xdg_activation_token_v1 *token = activation_token_create(activation);
- if (token == NULL) {
- return NULL;
- }
-- wl_list_init(&token->link);
-- wl_list_init(&token->seat_destroy.link);
-- wl_list_init(&token->surface_destroy.link);
--
-- token->activation = activation;
- token->token = strdup(token_str);
-
- wl_list_insert(&activation->tokens, &token->link);
---
-2.36.0
-
diff --git a/wlroots-0.16-backports.patch b/wlroots-0.16-backports.patch
new file mode 100644
index 0000000..ed9b7a9
--- /dev/null
+++ b/wlroots-0.16-backports.patch
@@ -0,0 +1,454 @@
+From bc6422115cf0dd0c065d3a6ec4d1ac363aad39fd Mon Sep 17 00:00:00 2001
+From: Simon Zeni <simon(a)bl4ckb0ne.ca>
+Date: Fri, 11 Nov 2022 14:52:24 -0500
+Subject: [PATCH 01/12] render/egl: fix uninitialized pointers in
+ init_dmabuf_formats
+
+`modifiers` and `external_only` are never initialized, and free'd later. This
+commit explicitly initializes them to NULL to prevent segfaults on `free()`
+
+(cherry picked from commit ed71915742160f2b9157adbad79364e22ab7ebda)
+---
+ render/egl.c | 4 ++--
+ 1 file changed, 2 insertions(+), 2 deletions(-)
+
+diff --git a/render/egl.c b/render/egl.c
+index e3839c7d..0c25e036 100644
+--- a/render/egl.c
++++ b/render/egl.c
+@@ -124,8 +124,8 @@ static void init_dmabuf_formats(struct wlr_egl *egl) {
+ for (int i = 0; i < formats_len; i++) {
+ uint32_t fmt = formats[i];
+
+- uint64_t *modifiers;
+- EGLBoolean *external_only;
++ uint64_t *modifiers = NULL;
++ EGLBoolean *external_only = NULL;
+ int modifiers_len = 0;
+ if (!no_modifiers) {
+ modifiers_len = get_egl_dmabuf_modifiers(egl, fmt, &modifiers,
&external_only);
+--
+2.38.1
+
+
+From a6ff023df291a770fb907a88ca39b9ee5b1cc89e Mon Sep 17 00:00:00 2001
+From: Simon Ser <contact(a)emersion.fr>
+Date: Tue, 15 Nov 2022 10:55:38 +0100
+Subject: [PATCH 02/12] backend/drm: only request page-flip if active
+
+It doesn't make sense to request a page-flip for a disabled output.
+
+Fixes: 84e727daae67 ("backend/drm: request page-flip event on modeset")
+Closes:
https://gitlab.freedesktop.org/wlroots/wlroots/-/issues/3528
+(cherry picked from commit f863b93c05a73097ccddce1ed066f3f11bfb1c3e)
+---
+ backend/drm/drm.c | 2 +-
+ 1 file changed, 1 insertion(+), 1 deletion(-)
+
+diff --git a/backend/drm/drm.c b/backend/drm/drm.c
+index 04994c68..1f4e74c5 100644
+--- a/backend/drm/drm.c
++++ b/backend/drm/drm.c
+@@ -577,7 +577,7 @@ bool drm_connector_commit_state(struct wlr_drm_connector *conn,
+ return false;
+ }
+ }
+- if (pending.modeset) {
++ if (pending.modeset && pending.active) {
+ flags |= DRM_MODE_PAGE_FLIP_EVENT;
+ }
+
+--
+2.38.1
+
+
+From 990cba89662c5d892dd8e045e737b6ada2f6d1ae Mon Sep 17 00:00:00 2001
+From: bi4k8 <bi4k8-js7gse3b01w(a)mt2015.com>
+Date: Tue, 15 Nov 2022 01:00:27 +0000
+Subject: [PATCH 03/12] wlr_seat: clear `drag->seat_client` when destroyed
+
+This was previously a use-after-free in `wlr_drag.c`.
+
+(cherry picked from commit 8b12037cadb2422a10d948babc4fd77ce637f158)
+---
+ types/data_device/wlr_drag.c | 6 +++---
+ types/seat/wlr_seat.c | 4 ++++
+ 2 files changed, 7 insertions(+), 3 deletions(-)
+
+diff --git a/types/data_device/wlr_drag.c b/types/data_device/wlr_drag.c
+index d3cb979d..c1fa801b 100644
+--- a/types/data_device/wlr_drag.c
++++ b/types/data_device/wlr_drag.c
+@@ -55,14 +55,14 @@ static void drag_set_focus(struct wlr_drag *drag,
+ goto out;
+ }
+
+- if (!drag->source &&
++ if (!drag->source && drag->seat_client &&
+ wl_resource_get_client(surface->resource) !=
+ drag->seat_client->client) {
+ goto out;
+ }
+
+ struct wlr_seat_client *focus_client = wlr_seat_client_for_wl_client(
+- drag->seat_client->seat, wl_resource_get_client(surface->resource));
++ drag->seat, wl_resource_get_client(surface->resource));
+ if (!focus_client) {
+ goto out;
+ }
+@@ -71,7 +71,7 @@ static void drag_set_focus(struct wlr_drag *drag,
+ drag->source->accepted = false;
+
+ uint32_t serial =
+- wl_display_next_serial(drag->seat_client->seat->display);
++ wl_display_next_serial(drag->seat->display);
+
+ struct wl_resource *device_resource;
+ wl_resource_for_each(device_resource, &focus_client->data_devices) {
+diff --git a/types/seat/wlr_seat.c b/types/seat/wlr_seat.c
+index 59b760ca..f83ccd6d 100644
+--- a/types/seat/wlr_seat.c
++++ b/types/seat/wlr_seat.c
+@@ -75,6 +75,10 @@ static void seat_client_handle_resource_destroy(
+ client->seat->keyboard_state.focused_client = NULL;
+ }
+
++ if (client->seat->drag && client ==
client->seat->drag->seat_client) {
++ client->seat->drag->seat_client = NULL;
++ }
++
+ struct wl_resource *resource, *tmp;
+ wl_resource_for_each_safe(resource, tmp, &client->pointers) {
+ wl_resource_destroy(resource);
+--
+2.38.1
+
+
+From b9b6334639bed442e039b61ec902692da557d4de Mon Sep 17 00:00:00 2001
+From: Kirill Primak <vyivel(a)eclair.cafe>
+Date: Sun, 13 Nov 2022 01:30:22 +0300
+Subject: [PATCH 04/12] xwayland: fix wlr_xwayland_surface_from_wlr_surface()
+ docs
+
+32daa43a454bcea1306ad0976fd4161ce8c7e86f has removed the asymmetry in
+the relationship of a wlr_surface and an unmapped wlr_xwayland_surface,
+when wlr_surface.role_data wasn't NULL but wlr_xwayland_surface.surface
+was. However, this also means that
+wlr_xwayland_surface_from_wlr_surface() now returns NULL if the
+wlr_surface is unmapped. Fix the documentation to reflect this.
+
+(cherry picked from commit 627a5c511278e67c3c308cdc6a639cbb490f48c3)
+---
+ include/wlr/xwayland/xwayland.h | 2 +-
+ 1 file changed, 1 insertion(+), 1 deletion(-)
+
+diff --git a/include/wlr/xwayland/xwayland.h b/include/wlr/xwayland/xwayland.h
+index fd161937..372ab9a8 100644
+--- a/include/wlr/xwayland/xwayland.h
++++ b/include/wlr/xwayland/xwayland.h
+@@ -232,7 +232,7 @@ bool wlr_surface_is_xwayland_surface(struct wlr_surface *surface);
+ * Get a struct wlr_xwayland_surface from a struct wlr_surface.
+ * Asserts that the surface has the xwayland surface role.
+ * May return NULL even if the surface has the xwayland surface role if the
+- * corresponding xwayland surface has been destroyed.
++ * corresponding xwayland surface has been unmapped or destroyed.
+ */
+ struct wlr_xwayland_surface *wlr_xwayland_surface_from_wlr_surface(
+ struct wlr_surface *surface);
+--
+2.38.1
+
+
+From e169ebb8cfbdb92f932b3f973e20ce79495bd983 Mon Sep 17 00:00:00 2001
+From: Simon Ser <contact(a)emersion.fr>
+Date: Thu, 10 Nov 2022 12:28:34 +0100
+Subject: [PATCH 05/12] backend/drm: log refresh rate in Hz
+
+(cherry picked from commit b3da33116ea9fb3ef948ae72425534b43c217579)
+---
+ backend/drm/drm.c | 4 ++--
+ 1 file changed, 2 insertions(+), 2 deletions(-)
+
+diff --git a/backend/drm/drm.c b/backend/drm/drm.c
+index 1f4e74c5..55f95c91 100644
+--- a/backend/drm/drm.c
++++ b/backend/drm/drm.c
+@@ -1302,9 +1302,9 @@ static void connect_drm_connector(struct wlr_drm_connector
*wlr_conn,
+ wlr_conn->crtc->mode_id = mode_id;
+ }
+
+- wlr_log(WLR_INFO, " %"PRId32"x%"PRId32"@%"PRId32"
%s",
++ wlr_log(WLR_INFO, " %"PRId32"x%"PRId32" @ %.3f Hz %s",
+ mode->wlr_mode.width, mode->wlr_mode.height,
+- mode->wlr_mode.refresh,
++ (float)mode->wlr_mode.refresh / 1000,
+ mode->wlr_mode.preferred ? "(preferred)" : "");
+
+ wl_list_insert(wlr_conn->output.modes.prev, &mode->wlr_mode.link);
+--
+2.38.1
+
+
+From 356ac5eed90a2c8b899dbfaf8a7a17237868adeb Mon Sep 17 00:00:00 2001
+From: Simon Ser <contact(a)emersion.fr>
+Date: Thu, 10 Nov 2022 12:28:53 +0100
+Subject: [PATCH 06/12] backend/drm: log modesetting commits
+
+(cherry picked from commit 65836ce357e4140d4e5250228a05ddd96119a883)
+---
+ backend/drm/drm.c | 6 ++++++
+ 1 file changed, 6 insertions(+)
+
+diff --git a/backend/drm/drm.c b/backend/drm/drm.c
+index 55f95c91..74265d4f 100644
+--- a/backend/drm/drm.c
++++ b/backend/drm/drm.c
+@@ -581,6 +581,12 @@ bool drm_connector_commit_state(struct wlr_drm_connector *conn,
+ flags |= DRM_MODE_PAGE_FLIP_EVENT;
+ }
+
++ if (pending.modeset) {
++ wlr_drm_conn_log(conn, WLR_INFO, "Modesetting with %dx%d @ %.3f Hz",
++ pending.mode.hdisplay, pending.mode.vdisplay,
++ (float)calculate_refresh_rate(&pending.mode) / 1000);
++ }
++
+ if (!drm_crtc_commit(conn, &pending, flags, false)) {
+ return false;
+ }
+--
+2.38.1
+
+
+From 9c5445148235109b4fb986138c6294db4d0334d8 Mon Sep 17 00:00:00 2001
+From: Simon Ser <contact(a)emersion.fr>
+Date: Tue, 15 Nov 2022 10:06:23 +0100
+Subject: [PATCH 07/12] backend/drm: fix FPE when disabling output
+
+Fixes: 65836ce357e4 ("backend/drm: log modesetting commits")
+Closes:
https://gitlab.freedesktop.org/wlroots/wlroots/-/issues/3534
+(cherry picked from commit a40ba16a6414f72ae0224164bb08cd8479dc52ee)
+---
+ backend/drm/drm.c | 10 +++++++---
+ 1 file changed, 7 insertions(+), 3 deletions(-)
+
+diff --git a/backend/drm/drm.c b/backend/drm/drm.c
+index 74265d4f..a7ff585e 100644
+--- a/backend/drm/drm.c
++++ b/backend/drm/drm.c
+@@ -582,9 +582,13 @@ bool drm_connector_commit_state(struct wlr_drm_connector *conn,
+ }
+
+ if (pending.modeset) {
+- wlr_drm_conn_log(conn, WLR_INFO, "Modesetting with %dx%d @ %.3f Hz",
+- pending.mode.hdisplay, pending.mode.vdisplay,
+- (float)calculate_refresh_rate(&pending.mode) / 1000);
++ if (pending.active) {
++ wlr_drm_conn_log(conn, WLR_INFO, "Modesetting with %dx%d @ %.3f Hz",
++ pending.mode.hdisplay, pending.mode.vdisplay,
++ (float)calculate_refresh_rate(&pending.mode) / 1000);
++ } else {
++ wlr_drm_conn_log(conn, WLR_INFO, "Turning off");
++ }
+ }
+
+ if (!drm_crtc_commit(conn, &pending, flags, false)) {
+--
+2.38.1
+
+
+From 724bc296f5a3dce3b619cf089b711cff3a8ece37 Mon Sep 17 00:00:00 2001
+From: =?UTF-8?q?Guido=20G=C3=BCnther?= <agx(a)sigxcpu.org>
+Date: Thu, 24 Nov 2022 22:38:29 +0100
+Subject: [PATCH 08/12] seat/pointer: Initialize low_res_value
+
+Fixes
+
+ In file included from /usr/include/wayland-server-core.h:32,
+ from ../types/seat/wlr_seat_pointer.c:6:
+ In function 'wl_fixed_from_double',
+ inlined from 'wlr_seat_pointer_send_axis' at
../types/seat/wlr_seat_pointer.c:367:6:
+ /usr/include/wayland-util.h:641:17: error: 'low_res_value' may be used
uninitialized [-Werror=maybe-uninitialized]
+ 641 | u.d = d + (3LL << (51 - 8));
+ | ~~^~~~~~~~~~~~~~~~~~~
+ ../types/seat/wlr_seat_pointer.c: In function 'wlr_seat_pointer_send_axis':
+ ../types/seat/wlr_seat_pointer.c:329:16: note: 'low_res_value' was declared
here
+ 329 | double low_res_value;
+ | ^~~~~~~~~~~~~
+---
+ types/seat/wlr_seat_pointer.c | 2 +-
+ 1 file changed, 1 insertion(+), 1 deletion(-)
+
+diff --git a/types/seat/wlr_seat_pointer.c b/types/seat/wlr_seat_pointer.c
+index 8d6154b0..ffa706bd 100644
+--- a/types/seat/wlr_seat_pointer.c
++++ b/types/seat/wlr_seat_pointer.c
+@@ -326,7 +326,7 @@ void wlr_seat_pointer_send_axis(struct wlr_seat *wlr_seat, uint32_t
time,
+ send_source = true;
+ }
+
+- double low_res_value;
++ double low_res_value = 0.0;
+ int32_t low_res_value_discrete = 0;
+ update_value120_accumulators(client, orientation, value, value_discrete,
+ &low_res_value, &low_res_value_discrete);
+--
+2.38.1
+
+
+From 4892082836399fda80dd55671c46b005f0451c5c Mon Sep 17 00:00:00 2001
+From: Johan Malm <jgm323(a)gmail.com>
+Date: Sat, 26 Nov 2022 17:18:33 +0000
+Subject: [PATCH 09/12] scene/layer_shell_v1.c: set exclusive zone correctly
+
+...when only one edge is anchored.
+
+The layer-shell protocol specifies that a positive exclusive-zone value is
+'meaningful' if the surface is anchored to either:
+
+1. one edge
+2. one edge and both perpendicular edges.
+
+For example, if you wish to position a layer-shell client along the top
+edge and make it exclusive, you should be able to either set anchor=TOP or
+anchor=TOP|LEFT|RIGHT. It appears that many panels/bars use the latter
+approach (anchor to an edge and also both perpendicular edges) which is
+probably why this has not been reported previously.
+
+This patch adds support for the first case and thereby makes exclusive
+zone behaviour consistent with the protocol and also with sway's extant
+layer-shell implementation.
+
+(cherry picked from commit 8e80432a72b18a1ddbacdb08ff0c41645578f1ee)
+---
+ types/scene/layer_shell_v1.c | 4 ++++
+ 1 file changed, 4 insertions(+)
+
+diff --git a/types/scene/layer_shell_v1.c b/types/scene/layer_shell_v1.c
+index 22986983..e523d315 100644
+--- a/types/scene/layer_shell_v1.c
++++ b/types/scene/layer_shell_v1.c
+@@ -39,6 +39,7 @@ static void layer_surface_exclusive_zone(
+ struct wlr_layer_surface_v1_state *state,
+ struct wlr_box *usable_area) {
+ switch (state->anchor) {
++ case ZWLR_LAYER_SURFACE_V1_ANCHOR_TOP:
+ case (ZWLR_LAYER_SURFACE_V1_ANCHOR_TOP |
+ ZWLR_LAYER_SURFACE_V1_ANCHOR_LEFT |
+ ZWLR_LAYER_SURFACE_V1_ANCHOR_RIGHT):
+@@ -46,12 +47,14 @@ static void layer_surface_exclusive_zone(
+ usable_area->y += state->exclusive_zone + state->margin.top;
+ usable_area->height -= state->exclusive_zone + state->margin.top;
+ break;
++ case ZWLR_LAYER_SURFACE_V1_ANCHOR_BOTTOM:
+ case (ZWLR_LAYER_SURFACE_V1_ANCHOR_BOTTOM |
+ ZWLR_LAYER_SURFACE_V1_ANCHOR_LEFT |
+ ZWLR_LAYER_SURFACE_V1_ANCHOR_RIGHT):
+ // Anchor bottom
+ usable_area->height -= state->exclusive_zone + state->margin.bottom;
+ break;
++ case ZWLR_LAYER_SURFACE_V1_ANCHOR_LEFT:
+ case (ZWLR_LAYER_SURFACE_V1_ANCHOR_TOP |
+ ZWLR_LAYER_SURFACE_V1_ANCHOR_BOTTOM |
+ ZWLR_LAYER_SURFACE_V1_ANCHOR_LEFT):
+@@ -59,6 +62,7 @@ static void layer_surface_exclusive_zone(
+ usable_area->x += state->exclusive_zone + state->margin.left;
+ usable_area->width -= state->exclusive_zone + state->margin.left;
+ break;
++ case ZWLR_LAYER_SURFACE_V1_ANCHOR_RIGHT:
+ case (ZWLR_LAYER_SURFACE_V1_ANCHOR_TOP |
+ ZWLR_LAYER_SURFACE_V1_ANCHOR_BOTTOM |
+ ZWLR_LAYER_SURFACE_V1_ANCHOR_RIGHT): // Anchor right
+--
+2.38.1
+
+
+From e0fe72ffdd66bcf2f43f728858d745171498d58d Mon Sep 17 00:00:00 2001
+From: Johan Malm <jgm323(a)gmail.com>
+Date: Sat, 26 Nov 2022 17:23:51 +0000
+Subject: [PATCH 10/12] scene/layer_shell_v1.c: remove redundant comment
+
+(cherry picked from commit 338e0a3976f2bad5ec048b022648a671ed443b4f)
+---
+ types/scene/layer_shell_v1.c | 2 +-
+ 1 file changed, 1 insertion(+), 1 deletion(-)
+
+diff --git a/types/scene/layer_shell_v1.c b/types/scene/layer_shell_v1.c
+index e523d315..3ed616a9 100644
+--- a/types/scene/layer_shell_v1.c
++++ b/types/scene/layer_shell_v1.c
+@@ -65,7 +65,7 @@ static void layer_surface_exclusive_zone(
+ case ZWLR_LAYER_SURFACE_V1_ANCHOR_RIGHT:
+ case (ZWLR_LAYER_SURFACE_V1_ANCHOR_TOP |
+ ZWLR_LAYER_SURFACE_V1_ANCHOR_BOTTOM |
+- ZWLR_LAYER_SURFACE_V1_ANCHOR_RIGHT): // Anchor right
++ ZWLR_LAYER_SURFACE_V1_ANCHOR_RIGHT):
+ // Anchor right
+ usable_area->width -= state->exclusive_zone + state->margin.right;
+ break;
+--
+2.38.1
+
+
+From de5e091996bfa58a0a93fac38a45235b7cb06488 Mon Sep 17 00:00:00 2001
+From: Simon Zeni <simon(a)bl4ckb0ne.ca>
+Date: Tue, 29 Nov 2022 15:21:18 -0500
+Subject: [PATCH 11/12] types/wlr_seat: finish keyboard_state during
+ wlr_seat_destroy
+
+(cherry picked from commit 0611c10909b17276bd633a4ee9a322995e9a3580)
+---
+ types/seat/wlr_seat.c | 2 ++
+ 1 file changed, 2 insertions(+)
+
+diff --git a/types/seat/wlr_seat.c b/types/seat/wlr_seat.c
+index f83ccd6d..c2985824 100644
+--- a/types/seat/wlr_seat.c
++++ b/types/seat/wlr_seat.c
+@@ -179,6 +179,8 @@ void wlr_seat_destroy(struct wlr_seat *seat) {
+ wlr_seat_pointer_clear_focus(seat);
+ wlr_seat_keyboard_clear_focus(seat);
+
++ wlr_seat_set_keyboard(seat, NULL);
++
+ struct wlr_touch_point *point;
+ wl_list_for_each(point, &seat->touch_state.touch_points, link) {
+ wlr_seat_touch_point_clear_focus(seat, 0, point->touch_id);
+--
+2.38.1
+
+
+From f1bea43ccccd5824097d8660a2d20b5d0bf506be Mon Sep 17 00:00:00 2001
+From: Simon Ser <contact(a)emersion.fr>
+Date: Wed, 30 Nov 2022 15:58:08 +0100
+Subject: [PATCH 12/12] Revert "compositor: enforce surface destruction order"
+
+This reverts commit c09d3450d494e21f065c12f199fa5ba8bfd946a9.
+
+This doesn't play well with the Xwayland surface role.
+---
+ types/wlr_compositor.c | 8 --------
+ 1 file changed, 8 deletions(-)
+
+diff --git a/types/wlr_compositor.c b/types/wlr_compositor.c
+index 5e6de244..fa4a8aa5 100644
+--- a/types/wlr_compositor.c
++++ b/types/wlr_compositor.c
+@@ -36,14 +36,6 @@ static int max(int fst, int snd) {
+
+ static void surface_handle_destroy(struct wl_client *client,
+ struct wl_resource *resource) {
+- struct wlr_surface *surface = wlr_surface_from_resource(resource);
+- if (surface->role_data != NULL) {
+- // TODO: send WL_SURFACE_ERROR_DEFUNCT_ROLE_OBJECT
+- //
https://gitlab.freedesktop.org/wayland/wayland/-/merge_requests/278
+- wl_resource_post_error(resource, -1,
+- "surface was destroyed before its role object");
+- return;
+- }
+ wl_resource_destroy(resource);
+ }
+
+--
+2.38.1
+
diff --git a/wlroots.spec b/wlroots.spec
index bb3a645..d57bcc8 100644
--- a/wlroots.spec
+++ b/wlroots.spec
@@ -1,9 +1,9 @@
# Version of the .so library
-%global abi_ver 10
+%global abi_ver 11
Name: wlroots
-Version: 0.15.1
-Release: 5%{?dist}
+Version: 0.16.0
+Release: 1%{?dist}
Summary: A modular Wayland compositor library
# Source files/overall project licensed as MIT, but
@@ -34,32 +34,32 @@ Source2:
https://emersion.fr/.well-known/openpgpkey/hu/dj3498u4hyyarh35rk
# - only has targets for examples known to compile well (cf. "examples) global)
Source3: examples.meson.build
-# Following 3 patches are required for phoc.
-Patch0: Revert-layer-shell-error-on-0-dimension-without-anch.patch
-Patch1:
wlroots-0.15.1-wlr_output_layout_contains_point-handle-outputs-that.patch
-Patch2: wlroots-0.15.1-xdg-activation-Deduplicate-token-creation-code.patch
-# wlroots/wlroots!3601
-Patch3:
wlroots-0.15.1-wlr_output_commit_state-Make-sure-to-clear-the-back-.patch
+# Upstream patches
+# Backports for 0.16.1 bugfix release: git format-patch --stdout 0.16.0..0.16
+Patch0: wlroots-0.16-backports.patch
+
+# Fedora patches
+# Following patch is required for phoc.
+Patch10: Revert-layer-shell-error-on-0-dimension-without-anch.patch
BuildRequires: gcc
BuildRequires: glslang
BuildRequires: gnupg2
-BuildRequires: meson >= 0.58.1
+BuildRequires: meson >= 0.59.0
BuildRequires: pkgconfig(egl)
BuildRequires: pkgconfig(gbm) >= 17.1.0
BuildRequires: pkgconfig(glesv2)
-BuildRequires: pkgconfig(libdrm) >= 2.4.109
-BuildRequires: pkgconfig(libinput) >= 1.14.0
+BuildRequires: pkgconfig(hwdata)
+BuildRequires: pkgconfig(libdrm) >= 2.4.113
+BuildRequires: pkgconfig(libinput) >= 1.21.0
BuildRequires: pkgconfig(libseat)
-BuildRequires: pkgconfig(libsystemd) >= 237
BuildRequires: pkgconfig(libudev)
BuildRequires: pkgconfig(pixman-1)
BuildRequires: pkgconfig(vulkan)
BuildRequires: pkgconfig(wayland-client)
-BuildRequires: pkgconfig(wayland-egl)
-BuildRequires: pkgconfig(wayland-protocols) >= 1.24
+BuildRequires: pkgconfig(wayland-protocols) >= 1.27
BuildRequires: pkgconfig(wayland-scanner)
-BuildRequires: pkgconfig(wayland-server) >= 1.19
+BuildRequires: pkgconfig(wayland-server) >= 1.21
BuildRequires: pkgconfig(x11-xcb)
BuildRequires: pkgconfig(xcb)
BuildRequires: pkgconfig(xcb-icccm)
@@ -99,10 +99,6 @@ MESON_OPTIONS=(
# Disable options requiring extra/unpackaged dependencies
-Dexamples=false
-Dxcb-errors=disabled
-%ifarch s390x
- # Disable -Werror on s390x:
https://github.com/swaywm/wlroots/issues/2018
- -Dwerror=false
-%endif
)
%{meson} "${MESON_OPTIONS[@]}"
@@ -137,6 +133,9 @@ install -pm0644 -D '%{SOURCE3}'
'%{buildroot}/%{_pkgdocdir}/examples/meson.build
%changelog
+* Fri Dec 02 2022 Aleksei Bavshin <alebastr(a)fedoraproject.org> - 0.16.0-1
+- Update to 0.16.0 (#2142159)
+
* Mon Nov 14 2022 Aleksei Bavshin <alebastr(a)fedoraproject.org> - 0.15.1-5
- Backport upstream crash fix (#2142447)
- Convert license to SPDX