Merge pull request #128459 from Ma27/backport-sway

[21.05] sway: 1.6 -> 1.6.1, wlroots: 0.13.0 -> 0.14.0
This commit is contained in:
Anderson Torres
2021-07-08 11:30:06 -03:00
committed by GitHub
9 changed files with 138 additions and 13 deletions
@@ -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 = [
@@ -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);
}
@@ -1,6 +1,7 @@
{ lib
, stdenv
, fetchFromGitHub
, fetchpatch
, cairo
, fontconfig
, libxkbcommon
@@ -31,6 +32,15 @@ stdenv.mkDerivation rec {
hash = "sha256-1IztedN5/I/4TDKHLJ26fSrDsvJ5QAr+cbzS2PQITDE=";
};
patches = [
# To fix the build with wlroots 0.14.0:
(fetchpatch {
# Add fixes for wlroots 0.14.0
url = "https://github.com/project-repo/cagebreak/commit/d57869d43add58331386fc8e89c14bb2b74afe17.patch";
sha256 = "0g6sl8y4kk0bm5x6pxqbxw2j0gyg3ybr2v9m70q2pxp70kms4lqg";
})
];
nativeBuildInputs = [
makeWrapper
meson
@@ -1,6 +1,7 @@
{ lib
, stdenv
, fetchFromGitHub
, fetchpatch
, pkg-config
, meson
, ninja
@@ -30,6 +31,15 @@ stdenv.mkDerivation rec {
sha256 = "0rhniv5j4bypqxxj0nbpa3hclmn8znal9rldv0mrgbizn3wsbs54";
};
patches = [
# To fix the build with wlroots 0.14:
(fetchpatch {
# output: access texture width/height directly
url = "https://github.com/johanmalm/labwc/commit/892e93dd84c514b4e6f34a0fab01c727edd2d8de.patch";
sha256 = "1p1pg1kd98727wlcspa2sffl7ijhvsfad6bj2rxsw322q0bz3yrh";
})
];
nativeBuildInputs = [ pkg-config meson ninja scdoc ];
buildInputs = [
cairo
@@ -10,13 +10,13 @@
stdenv.mkDerivation rec {
pname = "sway-unwrapped";
version = "1.6";
version = "1.6.1";
src = fetchFromGitHub {
owner = "swaywm";
repo = "sway";
rev = version;
sha256 = "0vnplva11yafhbijrk68wy7pw0psn9jm0caaymswq1s951xsn1c8";
sha256 = "0j4sdbsrlvky1agacc0pcz9bwmaxjmrapjnzscbd2i0cria2fc5j";
};
patches = [