Created
June 21, 2024 19:09
-
-
Save raku-cat/9d742a707e35d510a15e41e9a9b656e4 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
From e4dbc61b2a59eb84953f604269ede6549667b5ee Mon Sep 17 00:00:00 2001 | |
From: Simon Ser <[email protected]> | |
Date: Fri, 10 May 2024 16:11:38 +0200 | |
Subject: [PATCH] Add support for linux-drm-syncobj-v1 | |
References: https://gitlab.freedesktop.org/wlroots/wlroots/-/merge_requests/4262 | |
--- | |
sway/server.c | 6 ++++++ | |
1 file changed, 6 insertions(+) | |
diff --git a/sway/server.c b/sway/server.c | |
index 180d3a6bc3..b6b43279b8 100644 | |
--- a/sway/server.c | |
+++ b/sway/server.c | |
@@ -23,6 +23,7 @@ | |
#include <wlr/types/wlr_idle_notify_v1.h> | |
#include <wlr/types/wlr_layer_shell_v1.h> | |
#include <wlr/types/wlr_linux_dmabuf_v1.h> | |
+#include <wlr/types/wlr_linux_drm_syncobj_v1.h> | |
#include <wlr/types/wlr_output_management_v1.h> | |
#include <wlr/types/wlr_output_power_management_v1.h> | |
#include <wlr/types/wlr_pointer_constraints_v1.h> | |
@@ -247,6 +248,11 @@ bool server_init(struct sway_server *server) { | |
wlr_drm_create(server->wl_display, server->renderer); | |
} | |
} | |
+ if (wlr_renderer_get_drm_fd(server->renderer) >= 0 && | |
+ server->renderer->features.timeline) { | |
+ wlr_linux_drm_syncobj_manager_v1_create(server->wl_display, 1, | |
+ wlr_renderer_get_drm_fd(server->renderer)); | |
+ } | |
server->allocator = wlr_allocator_autocreate(server->backend, | |
server->renderer); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# Maintainer: GreyXor <[email protected]> | |
# Contributor: Drew DeVault <[email protected]> | |
pkgname=sway-git | |
pkgver=1.10.r7350.cc34210 | |
pkgrel=1 | |
pkgdesc='Tiling Wayland compositor and replacement for the i3 window manager (git development version)' | |
arch=('x86_64') | |
url="https://github.com/swaywm/sway" | |
license=("MIT") | |
depends=( | |
"cairo" | |
"gdk-pixbuf2" | |
"glib2" | |
"glibc" | |
"json-c" | |
"libdrm" | |
"libevdev" | |
"libinput" | |
"libxcb" | |
"libxkbcommon" | |
"pango" | |
"pcre2" | |
"pixman" | |
"systemd-libs" | |
"wayland" | |
"wlroots-git" | |
"xcb-util-wm" | |
) | |
makedepends=( | |
"git" | |
"libcap" | |
"meson" | |
"scdoc" | |
"wayland-protocols" | |
) | |
optdepends=( | |
'wmenu: Application launcher used in default configuration' | |
'foot: Terminal emulator used in default configuration' | |
'polkit: System privilege control. Required if not using seatd service' | |
'swaybg: Wallpaper tool for sway' | |
'swayidle: Idle management daemon' | |
'swaylock: Screen locker' | |
'xdg-desktop-portal-gtk: Portal used for default file picking' | |
'xdg-desktop-portal-wlr: Portal used for screen sharing' | |
) | |
provides=("${pkgname%-git}") | |
conflicts=("${pkgname%-git}") | |
install="${pkgname}.install" | |
source=("${pkgname}::git+${url}.git" | |
"50-systemd-user.conf" | |
"sway-portals.conf" | |
"8156.patch") | |
b2sums=('SKIP' | |
'71f45f9abb4e9f98a52177b227aa30ab27d02c9eef8a31400460e71c72b6d40ec396581f0b1703d4cec655aaba704077212882f643c6efb6cda951ea69b5383d' | |
'cdba5fd2988b7ead8b264d5b41f1c7adb47a6487be1e3a4ce98c0af2094d9964f4bc364237c4437014be18061f067aa741b0382f21365be497e06b189c5c7728' | |
'b5b439138efd873ccc6bb5abe0f8f5786c8c9fdddd7f3d3fc07cfa1a617b43147b16a38dd4f8d5babf1ea527f8a3078cfaad2254223c40020831db7234d5d0d8') | |
_meson_setup() { | |
arch-meson "$pkgname" "$1" -D sd-bus-provider=libsystemd | |
} | |
prepare() { | |
_meson_setup build-pkgver | |
cd "$pkgname" | |
git apply -v ../8156.patch | |
} | |
pkgver() { | |
( | |
set -o pipefail | |
meson introspect --projectinfo build-pkgver | sed -n 's/.*"version": "\([^"]*\)".*/\1/;s/-dev//p' | tr -d '\n' | |
) | |
cd "$pkgname" | |
printf ".r%s.%s" "$(git rev-list --count HEAD)" "$(git rev-parse --short=7 HEAD)" | |
} | |
build() { | |
_meson_setup build | |
meson compile -C build | |
} | |
package() { | |
meson install -C build --destdir "$pkgdir" | |
install -Dm644 "${pkgname}/LICENSE" "${pkgdir}/usr/share/licenses/${pkgname}/LICENSE" | |
install -Dm644 "${pkgname}/README.md" "${pkgdir}/usr/share/doc/${pkgname}/README.md" | |
install -Dm644 50-systemd-user.conf -t "$pkgdir/etc/sway/config.d/" | |
install -Dm644 sway-portals.conf -t "$pkgdir/usr/share/xdg-desktop-portal/" | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment