about summary refs log tree commit diff
path: root/pkgs/applications/window-managers/cage
diff options
context:
space:
mode:
authorMichael Weiss <dev.primeos@gmail.com>2021-06-23 14:41:18 +0200
committerMichael Weiss <dev.primeos@gmail.com>2021-06-24 22:15:17 +0200
commit203c8edcdac9491912cb21fa9d84392cb6a69eef (patch)
tree600b12d6c8f3fffebbbde753d9221066b6d1563e /pkgs/applications/window-managers/cage
parent72dac3d449e238a1b223c8275dcacf8b48e719ab (diff)
wlroots: 0.13.0 -> 0.14.0
The new release comes with breaking changes so we temporarily introduce
wlroots_0_13 for packages that don't yet support wlroots 0.14.
For the rest of the packages the required upstream patches for this new
wlroots release are fetched (if feasible).
Diffstat (limited to 'pkgs/applications/window-managers/cage')
-rw-r--r--pkgs/applications/window-managers/cage/default.nix5
-rw-r--r--pkgs/applications/window-managers/cage/wlroots-0_14.patch36
2 files changed, 41 insertions, 0 deletions
diff --git a/pkgs/applications/window-managers/cage/default.nix b/pkgs/applications/window-managers/cage/default.nix
index 1632ae027c0ad..d9623f474f7a6 100644
--- a/pkgs/applications/window-managers/cage/default.nix
+++ b/pkgs/applications/window-managers/cage/default.nix
@@ -17,6 +17,11 @@ stdenv.mkDerivation rec {
     sha256 = "0ixl45g0m8b75gvbjm3gf5qg0yplspgs0xpm2619wn5sygc47sb1";
   };
 
+  patches = [
+    # To fix the build with wlroots 0.14.0:
+    ./wlroots-0_14.patch
+  ];
+
   nativeBuildInputs = [ meson ninja pkg-config wayland scdoc makeWrapper ];
 
   buildInputs = [
diff --git a/pkgs/applications/window-managers/cage/wlroots-0_14.patch b/pkgs/applications/window-managers/cage/wlroots-0_14.patch
new file mode 100644
index 0000000000000..2e56835f4fcda
--- /dev/null
+++ b/pkgs/applications/window-managers/cage/wlroots-0_14.patch
@@ -0,0 +1,36 @@
+From 9a4523d47efeafd674d419169fe161e5a3b31cb3 Mon Sep 17 00:00:00 2001
+From: Jan Beich <jbeich@FreeBSD.org>
+Date: Thu, 3 Jun 2021 17:53:11 +0000
+Subject: [PATCH 1/3] view: chase swaywm/wlroots@9e58301df7f0
+
+view.c:238:52: error: no member named 'subsurfaces' in 'struct wlr_surface'
+        wl_list_for_each (subsurface, &view->wlr_surface->subsurfaces, parent_link) {
+                                       ~~~~~~~~~~~~~~~~~  ^
+/usr/include/wayland-util.h:443:30: note: expanded from macro 'wl_list_for_each'
+        for (pos = wl_container_of((head)->next, pos, member);  \
+                                    ^~~~
+/usr/include/wayland-util.h:409:32: note: expanded from macro 'wl_container_of'
+        (__typeof__(sample))((char *)(ptr) -                            \
+                                      ^~~
+
+Based on https://github.com/swaywm/sway/commit/3162766eef14
+---
+ view.c | 5 ++++-
+ 1 file changed, 4 insertions(+), 1 deletion(-)
+
+diff --git a/view.c b/view.c
+index b9ba9c2..3f3b0ed 100644
+--- a/view.c
++++ b/view.c
+@@ -235,7 +235,10 @@ view_map(struct cg_view *view, struct wlr_surface *surface)
+ 	view->wlr_surface = surface;
+ 
+ 	struct wlr_subsurface *subsurface;
+-	wl_list_for_each (subsurface, &view->wlr_surface->subsurfaces, parent_link) {
++	wl_list_for_each (subsurface, &view->wlr_surface->subsurfaces_below, parent_link) {
++		subsurface_create(view, subsurface);
++	}
++	wl_list_for_each (subsurface, &view->wlr_surface->subsurfaces_above, parent_link) {
+ 		subsurface_create(view, subsurface);
+ 	}
+