-
-
Save rhoot/dcead8b195054387c067919fef499c5c to your computer and use it in GitHub Desktop.
diff --git a/include/sway/output.h b/include/sway/output.h | |
index 50d90d25..6e9f7aef 100644 | |
--- a/include/sway/output.h | |
+++ b/include/sway/output.h | |
@@ -8,6 +8,7 @@ | |
#include "config.h" | |
#include "sway/tree/node.h" | |
#include "sway/tree/view.h" | |
+#include <pixman.h> | |
struct sway_server; | |
struct sway_container; | |
@@ -58,6 +59,7 @@ struct sway_output { | |
int max_render_time; // In milliseconds | |
struct wl_event_source *repaint_timer; | |
bool gamma_lut_changed; | |
+ pixman_region32_t cursor_damage; | |
}; | |
struct sway_output_non_desktop { | |
diff --git a/sway/desktop/output.c b/sway/desktop/output.c | |
index 476bfd25..759e9cab 100644 | |
--- a/sway/desktop/output.c | |
+++ b/sway/desktop/output.c | |
@@ -571,6 +571,9 @@ static int output_repaint_timer_handler(void *data) { | |
return 0; | |
} | |
+ wlr_damage_ring_add(&output->damage_ring, &output->cursor_damage); | |
+ pixman_region32_clear(&output->cursor_damage); | |
+ | |
struct sway_workspace *workspace = output->current.active_workspace; | |
if (workspace == NULL) { | |
return 0; | |
@@ -601,7 +604,17 @@ static int output_repaint_timer_handler(void *data) { | |
pending.committed |= WLR_OUTPUT_STATE_DAMAGE; | |
get_frame_damage(output, &pending.damage); | |
- if (fullscreen_con && fullscreen_con->view && !debug.noscanout) { | |
+ const bool adaptive_sync = output->wlr_output->adaptive_sync_status == WLR_OUTPUT_ADAPTIVE_SYNC_ENABLED; | |
+ const bool has_fullscreen_view = fullscreen_con && fullscreen_con->view; | |
+ const bool no_cursor_move_frames = output->wlr_output->no_frames_for_cursor_moves; | |
+ | |
+ if (has_fullscreen_view && adaptive_sync && !no_cursor_move_frames) { | |
+ output->wlr_output->no_frames_for_cursor_moves = true; | |
+ } else if ((!has_fullscreen_view || !adaptive_sync) && no_cursor_move_frames) { | |
+ output->wlr_output->no_frames_for_cursor_moves = false; | |
+ } | |
+ | |
+ if (has_fullscreen_view && !debug.noscanout) { | |
// Try to scan-out the fullscreen view | |
static bool last_scanned_out = false; | |
bool scanned_out = | |
@@ -688,9 +701,19 @@ static void handle_damage(struct wl_listener *listener, void *user_data) { | |
struct sway_output *output = | |
wl_container_of(listener, output, damage); | |
struct wlr_output_event_damage *event = user_data; | |
- if (wlr_damage_ring_add(&output->damage_ring, event->damage)) { | |
- wlr_output_schedule_frame(output->wlr_output); | |
+ | |
+ pixman_region32_t clipped; | |
+ pixman_region32_init(&clipped); | |
+ pixman_region32_intersect_rect(&clipped, event->damage, | |
+ 0, 0, output->damage_ring.width, output->damage_ring.height); | |
+ bool intersects = pixman_region32_not_empty(&clipped); | |
+ if (intersects) { | |
+ pixman_region32_union(&output->cursor_damage, &output->cursor_damage, &clipped); | |
+ if (!output->wlr_output->no_frames_for_cursor_moves) { | |
+ wlr_output_schedule_frame(output->wlr_output); | |
+ } | |
} | |
+ pixman_region32_fini(&clipped); | |
} | |
static void handle_frame(struct wl_listener *listener, void *user_data) { | |
diff --git a/sway/tree/output.c b/sway/tree/output.c | |
index eccab2f7..626d81a3 100644 | |
--- a/sway/tree/output.c | |
+++ b/sway/tree/output.c | |
@@ -94,6 +94,7 @@ struct sway_output *output_create(struct wlr_output *wlr_output) { | |
wlr_output->data = output; | |
output->detected_subpixel = wlr_output->subpixel; | |
output->scale_filter = SCALE_FILTER_NEAREST; | |
+ pixman_region32_init(&output->cursor_damage); | |
wl_signal_init(&output->events.disable); | |
@@ -241,6 +242,7 @@ void output_destroy(struct sway_output *output) { | |
list_free(output->workspaces); | |
list_free(output->current.workspaces); | |
wl_event_source_remove(output->repaint_timer); | |
+ pixman_region32_fini(&output->cursor_damage); | |
free(output); | |
} | |
diff --git a/backend/drm/drm.c b/backend/drm/drm.c | |
index a4853ffa..9ede73bf 100644 | |
--- a/backend/drm/drm.c | |
+++ b/backend/drm/drm.c | |
@@ -976,7 +976,8 @@ static bool drm_connector_set_cursor(struct wlr_output *output, | |
conn->cursor_height = buffer->height; | |
} | |
- wlr_output_update_needs_frame(output); | |
+ if (!output->no_frames_for_cursor_moves) | |
+ wlr_output_update_needs_frame(output); | |
return true; | |
} | |
@@ -1006,7 +1007,8 @@ static bool drm_connector_move_cursor(struct wlr_output *output, | |
conn->cursor_x = box.x; | |
conn->cursor_y = box.y; | |
- wlr_output_update_needs_frame(output); | |
+ if (!output->no_frames_for_cursor_moves) | |
+ wlr_output_update_needs_frame(output); | |
return true; | |
} | |
diff --git a/include/wlr/types/wlr_output.h b/include/wlr/types/wlr_output.h | |
index aa3d7a18..8e321dae 100644 | |
--- a/include/wlr/types/wlr_output.h | |
+++ b/include/wlr/types/wlr_output.h | |
@@ -148,6 +148,7 @@ struct wlr_output { | |
// damage for cursors and fullscreen surface, in output-local coordinates | |
bool frame_pending; | |
float transform_matrix[9]; | |
+ bool no_frames_for_cursor_moves; | |
// true for example with VR headsets | |
bool non_desktop; |
Wait.. I must have been building Wlroots and Sway the wrong way on Arch Linux?..
I first removed all source files in PKGBUILD directory to avoid using cache. Also made sure that old Sway and Wlroots weren't in the system:
rm -rf src pkg *tar* sway-contrib
sudo pacman -R sway wlroots
Then I used a old commits which I know worked on 19th of August while trying this patch for the first time.
I started with building Wlroots (bdc34401 latest from Aug 19) with:
makepkg -si --skipinteg
wlroots/PKGBUILD
# Maintainer: Brett Cornwall <ainola@archlinux.org>
# Maintainer: Maxim Baz <$pkgname at maximbaz dot com>
# Contributor: Omar Pakker
pkgname=wlroots
pkgver=0.17.0
pkgrel=1
license=('MIT')
pkgdesc='Modular Wayland compositor library'
url='https://gitlab.freedesktop.org/wlroots/wlroots'
arch=('x86_64')
depends=(
'libglvnd'
'libinput'
'libpixman-1.so'
'libseat.so'
'libudev.so'
'libvulkan.so'
'libwayland-client.so'
'libwayland-server.so'
'libxcb'
'libxkbcommon.so'
'opengl-driver'
'xcb-util-errors'
'xcb-util-renderutil'
'xcb-util-wm'
)
makedepends=(
'glslang'
'meson'
'ninja'
'systemd'
'vulkan-headers'
'wayland-protocols'
'xorg-xwayland'
)
optdepends=(
'xorg-xwayland: Xwayland support'
)
provides=(
'libwlroots.so'
)
options=(
'debug'
)
source=(
#"https://gitlab.freedesktop.org/wlroots/wlroots/-/archive/master/wlroots-master.tar.gz"
"https://gitlab.freedesktop.org/wlroots/wlroots/-/archive/bdc34401ba8e4a59b3464c17fa5acf43ca417e57/wlroots-bdc34401ba8e4a59b3464c17fa5acf43ca417e57.tar.gz"
"wlroots.patch"
)
sha256sums=('SKIP'
'SKIP')
validpgpkeys=(
'34FF9526CFEF0E97A340E2E40FDE7BE0E88F5E48' # Simon Ser
'9DDA3B9FA5D58DD5392C78E652CB6609B22DA89A' # Drew DeVault
'4100929B33EEB0FD1DB852797BC79407090047CA' # Sway signing key
)
prepare() {
#patch --directory=wlroots-master -p1 < ../wlroots.patch
patch --directory=wlroots-bdc34401ba8e4a59b3464c17fa5acf43ca417e57 -p1 < ../wlroots.patch
}
build() {
#arch-meson wlroots-master build
arch-meson wlroots-bdc34401ba8e4a59b3464c17fa5acf43ca417e57 build
ninja -C build
}
package() {
DESTDIR="$pkgdir" ninja -C build install
#install -Dm644 "wlroots-master/LICENSE" -t "$pkgdir/usr/share/licenses/$pkgname/"
install -Dm644 "wlroots-bdc34401ba8e4a59b3464c17fa5acf43ca417e57/LICENSE" -t "$pkgdir/usr/share/licenses/$pkgname/"
}
Did the same with Sway with a older commit that worked before (bb91b7f from 3 weeks ago which was the latest on 19th of Aug):
makepkg -si --skipinteg
sway/PKGBUILD
# Maintainer: Brett Cornwall <ainola@archlinux.org>
# Maintainer: Maxim Baz <$pkgname at maximbaz dot com>
# Contributor: Alexander F. Rødseth <xyproto@archlinux.org>
pkgname=sway
pkgver=1.9.0
epoch=1
pkgrel=1
pkgdesc='Tiling Wayland compositor and replacement for the i3 window manager'
arch=(x86_64)
url='https://swaywm.org/'
license=(MIT)
depends=(
'cairo'
'gdk-pixbuf2'
'libevdev.so'
'libinput'
'libjson-c.so'
'libudev.so'
'libwayland-server.so'
'libwlroots.so'
'libxcb'
'libxkbcommon.so'
'pango'
'pcre2'
'ttf-font'
)
makedepends=(meson ninja scdoc setconf wayland-protocols)
backup=(
etc/sway/config
etc/sway/config.d/50-systemd-user.conf
)
optdepends=(
'bemenu: Wayland-native alternative to dmenu'
'dmenu: Application launcher used in default config'
'foot: Terminal emulator used in the default configuration'
'i3status: Status line generation'
'mako: Lightweight notification daemon'
'polkit: System privilege control. Required if not using seatd service'
'swaybg: Wallpaper tool for sway'
'swayidle: Idle management daemon'
'swaylock: Screen locker'
'waybar: Highly customizable bar'
'xorg-xwayland: X11 support'
)
source=(
#"https://github.com/swaywm/sway/archive/refs/heads/master.tar.gz"
"https://github.com/swaywm/sway/archive/bb91b7f5fa7fddb582b8dddf208cc335d39da9e7.tar.gz"
"sway-contrib::git+https://github.com/OctopusET/sway-contrib.git"
"50-systemd-user.conf"
"sway.patch"
)
install=sway.install
sha512sums=('SKIP'
'SKIP'
'SKIP'
'SKIP')
validpgpkeys=('34FF9526CFEF0E97A340E2E40FDE7BE0E88F5E48' # Simon Ser
'9DDA3B9FA5D58DD5392C78E652CB6609B22DA89A') # Drew DeVault
prepare() {
#cd sway-master/
cd sway-bb91b7f5fa7fddb582b8dddf208cc335d39da9e7/
# Enable user xkb configs with cap_sys_nice - otherwise user xkb configs will
# break.
#
# This patch was originally at
# https://github.com/swaywm/sway/commit/2f2cdd60def006f6d3cbe318f9edd7d68fcb239a.patch
# but failed to apply correctly to meson.build. We don't need that part of
# the patch so just drop it.
patch -p1 < ../sway.patch
# Set the version information to 'Arch Linux' instead of 'makepkg'
sed -i "s/branch \\\'@1@\\\'/Arch Linux/g" meson.build
}
build() {
mkdir -p build
#arch-meson build sway-master -D sd-bus-provider=libsystemd -D werror=false -D b_ndebug=true
arch-meson build sway-bb91b7f5fa7fddb582b8dddf208cc335d39da9e7 -D sd-bus-provider=libsystemd -D werror=false -D b_ndebug=true
ninja -C build
}
package() {
DESTDIR="$pkgdir" ninja -C build install
#install -Dm644 "sway-master/LICENSE" "$pkgdir/usr/share/licenses/$pkgname/LICENSE"
install -Dm644 "sway-bb91b7f5fa7fddb582b8dddf208cc335d39da9e7/LICENSE" "$pkgdir/usr/share/licenses/$pkgname/LICENSE"
install -Dm644 50-systemd-user.conf -t "$pkgdir/etc/sway/config.d/"
echo $PWD
cd "./sway-contrib"
for util in autoname-workspaces.py inactive-windows-transparency.py grimshot; do
install -Dm755 "$util" -t "$pkgdir/usr/share/$pkgname/scripts"
done
}
# vim: ts=2 sw=2 et
But to my surprise it was still giving the same compilation error as latest -git (but with slightly different line numbers)?..
Found ninja-1.11.1 at /usr/bin/ninja
ninja: Entering directory `build'
[68/318] Compiling C object sway/sway.p/xdg_decoration.c.o
FAILED: sway/sway.p/xdg_decoration.c.o
cc -Isway/sway.p -Isway -I../sway-bb91b7f5fa7fddb582b8dddf208cc335d39da9e7/sway -Iinclude -I../sway-bb91b7f5fa7fddb582b8dddf208cc335d39da9e7/include -Iprotocols -I/usr/include/cairo -I/usr/include/libpng16 -I/usr/include/freetype2 -I/usr/include/harfbuzz -I/usr/include/glib-2.0 -I/usr/lib/glib-2.0/include -I/usr/include/sysprof-4 -I/usr/include/pixman-1 -I/usr/include/libdrm -I/usr/include/json-c -I/usr/include/libevdev-1.0 -I/usr/include/pango-1.0 -I/usr/include/libmount -I/usr/include/blkid -I/usr/include/fribidi -flto=auto -fdiagnostics-color=always -DNDEBUG -D_FILE_OFFSET_BITS=64 -Wall -Winvalid-pch -Wextra -std=c11 -DWLR_USE_UNSTABLE -Wno-unused-parameter -Wno-unused-result -Wno-missing-braces -Wno-format-zero-length -Wundef -Wvla '-DSYSCONFDIR="//etc"' '-DSWAY_VERSION="1.9-dev-9733895 (" __DATE__ ", branch '"'"'main'"'"')"' -fmacro-prefix-map=../sway-bb91b7f5fa7fddb582b8dddf208cc335d39da9e7/= -march=native -O3 -pipe -fno-plt -fexceptions -Wp,-D_FORTIFY_SOURCE=2 -Wformat -Werror=format-security -fstack-clash-protection -fcf-protection -flto=auto -fPIE -pthread -MD -MQ sway/sway.p/xdg_decoration.c.o -MF sway/sway.p/xdg_decoration.c.o.d -o sway/sway.p/xdg_decoration.c.o -c ../sway-bb91b7f5fa7fddb582b8dddf208cc335d39da9e7/sway/xdg_decoration.c
../sway-bb91b7f5fa7fddb582b8dddf208cc335d39da9e7/sway/xdg_decoration.c: In function ‘handle_xdg_decoration’:
../sway-bb91b7f5fa7fddb582b8dddf208cc335d39da9e7/sway/xdg_decoration.c:56:62: error: ‘struct wlr_xdg_toplevel_decoration_v1’ has no member named ‘surface’
56 | struct sway_xdg_shell_view *xdg_shell_view = wlr_deco->surface->data;
| ^~
../sway-bb91b7f5fa7fddb582b8dddf208cc335d39da9e7/sway/xdg_decoration.c: In function ‘xdg_decoration_from_surface’:
../sway-bb91b7f5fa7fddb582b8dddf208cc335d39da9e7/sway/xdg_decoration.c:82:45: error: ‘struct wlr_xdg_toplevel_decoration_v1’ has no member named ‘surface’
82 | if (deco->wlr_xdg_decoration->surface->surface == surface) {
| ^~
[98/318] Compiling C object sway/sway.p/input_cursor.c.o
../sway-bb91b7f5fa7fddb582b8dddf208cc335d39da9e7/sway/input/cursor.c: In function ‘handle_constraint_commit’:
../sway-bb91b7f5fa7fddb582b8dddf208cc335d39da9e7/sway/input/cursor.c:930:43: warning: unused variable ‘constraint’ [-Wunused-variable]
930 | struct wlr_pointer_constraint_v1 *constraint = cursor->active_constraint;
| ^~~~~~~~~~
[101/318] Compiling C object sway/sway.p/input_tablet.c.o
ninja: build stopped: subcommand failed.
==> ERROR: A failure occurred in build().
Aborting...
Instead I tried sway-git-wlroots-git
which statically links wlroots (which is what Hyprland does actually):
sway-git-wlroots-git/PKGBUILD
# Maintainer: tomKPZ <tomKPZ@gmail.com>
# sway-git maintainer: Drew DeVault <sir@cmpwn.com>
# sway-git contributor: Antonin Décimo <antonin dot decimo at gmail dot com>
# wlroots-git maintainer: Adrian Perez de Castro <aperez@igalia.com>
# wlroots-git maintainer: Antonin Décimo <antonin dot decimo at gmail dot com>
pkgname=sway-git-wlroots-git
pkgver=r7176.d84b3832.r6570.7bf6c1fc.
pkgrel=1
license=("MIT" "custom:MIT")
pkgdesc="sway with wlroots statically linked"
makedepends=(
git
meson
scdoc
vulkan-headers
wayland-protocols
xorgproto
)
depends=(
cairo
gdk-pixbuf2
glslang
json-c
libdisplay-info
libinput
libxcb
libxkbcommon
opengl-driver
pango
pcre
pixman
polkit
seatd
swaybg-git
ttf-font
vulkan-icd-loader
vulkan-validation-layers
wayland
xcb-util-errors
xcb-util-renderutil
xcb-util-wm
xorg-server-xwayland
xorg-xwayland
)
optdepends=(
"alacritty: Terminal emulator used by the default config"
"dmenu: Application launcher"
"grim: Screenshot utility"
"i3status: Status line"
"mako: Lightweight notification daemon"
"slurp: Select a region"
"swayidle: Idle management daemon"
"swaylock: Screen locker"
"wallutils: Timed wallpapers"
"waybar: Highly customizable bar"
)
backup=(etc/sway/config)
arch=("x86_64")
url="https://swaywm.org"
source=(
"git+https://github.com/swaywm/sway.git"
"sway.patch"
"git+https://gitlab.freedesktop.org/wlroots/wlroots.git"
"wlroots.patch"
)
sha512sums=(
'SKIP'
'SKIP'
'SKIP'
'SKIP'
)
provides=("sway")
conflicts=("sway")
options=()
pkgver() {
printf "r%s.%s.r%s.%s" \
"$(git -C sway rev-list --count HEAD)" \
"$(git -C sway rev-parse --short HEAD)" \
"$(git -C wlroots rev-list --count HEAD)" \
"$(git -C wlroots rev-parse --short HEAD)"
}
build() {
mkdir -p sway/subprojects
ln -sf ../../wlroots sway/subprojects/wlroots
arch-meson \
-Dsd-bus-provider=libsystemd \
-Dwerror=false \
-Ddefault_library=static \
sway build
meson compile -C build
}
package() {
DESTDIR="$pkgdir" meson install -C build
# Remove wlroots headers, static library, and pkgconfig file.
rm -rf "$pkgdir/usr/include" "$pkgdir/usr/lib"
install -Dm644 "sway/LICENSE" "$pkgdir/usr/share/licenses/$pkgname/LICENSE.sway"
install -Dm644 "wlroots/LICENSE" "$pkgdir/usr/share/licenses/$pkgname/LICENSE.wlroots"
}
patchdir=${XDG_CONFIG_HOME:-$HOME/.config}/makepkg-patches/$pkgname
_pkgver_suffix=$(
shopt -s globstar
shopt -s nullglob
stat -c '%.Y' $patchdir $patchdir/**/*.patch |
sort -n | tail -n 1 | tr -d '\n'
)
dup_fn() {
test -n "$(declare -f "$1")" || return
eval "${_/$1/$1.orig}"
}
dup_fn pkgver || pkgver.orig() { printf $pkgver; }
pkgver() {
printf "$(pkgver.orig).$_pkgver_suffix"
}
dup_fn prepare || prepare.orig() { return 0; }
prepare() {
(
shopt -s nullglob
for patch in $patchdir/*.patch; do
git apply -3 $patch
done
for repo in $patchdir/*/; do
for patch in $repo/*.patch; do
git -C $(basename $repo) apply -3 $patch
done
done
)
prepare.orig
patch --directory=wlroots -p1 < ../wlroots.patch
patch --directory=sway -p1 < ../sway.patch
}
This compiled just fine with latest -git!
If I don't include patch --directory=wlroots -p1 < ../wlroots.patch
in sway-git-wlroots-git/PKGBUILD
I get the error from my comment above which confirms that Sway was never using my locally compiled Wlroots from earlier attempts?
@GrabbenD I generally pass -C
to makepkg
just to make sure it doesn't have some weird state from a previous build, since it clones a git repo. The packages are fast to build anyway.
The way I have it set up is:
-
Download the PKGBUILDs for
sway-git
andwlroots-git
withyay
:yay -G wlroots-git sway-git
-
Copy
wlroots.patch
into thewlroots-git
dir thatyay
created, andsway.patch
into thesway-git
dir it created. -
Update
wlroots-git/PKGBUILD
to make it apply the patch:Click for diff
diff --git a/PKGBUILD b/PKGBUILD index 78db8bc..0e7ed53 100644 --- a/PKGBUILD +++ b/PKGBUILD @@ -32,8 +32,8 @@ makedepends=( vulkan-headers wayland-protocols xorgproto) -source=("${pkgname}::git+${url}.git") -md5sums=('SKIP') +source=("${pkgname}::git+${url}.git" wlroots.patch) +md5sums=('SKIP' SKIP) _builddir="build" _builddir_pkgver="build-pkgver" @@ -48,6 +48,8 @@ _meson_setup () { prepare () { _meson_setup "${_builddir_pkgver}" + cd "$pkgname" + patch -p1 < ../wlroots.patch } pkgver () {
-
Update
sway-git/PKGBUILD
to make it apply the patch:Click for diff
diff --git a/PKGBUILD b/PKGBUILD index b9c83cb..682099c 100644 --- a/PKGBUILD +++ b/PKGBUILD @@ -40,9 +40,11 @@ backup=(etc/sway/config) arch=("i686" "x86_64") url="https://swaywm.org" source=("${pkgname%-*}::git+https://github.com/swaywm/sway.git" - 50-systemd-user.conf) + 50-systemd-user.conf + sway.patch) sha512sums=('SKIP' - 'c2b7d808f4231f318e03789015624fd4cf32b81434b15406570b4e144c0defc54e216d881447e6fd9fc18d7da608cccb61c32e0e1fab2f1fe2750acf812d3137') + 'c2b7d808f4231f318e03789015624fd4cf32b81434b15406570b4e144c0defc54e216d881447e6fd9fc18d7da608cccb61c32e0e1fab2f1fe2750acf812d3137' + 'SKIP') provides=("sway") conflicts=("sway") options=(debug) @@ -53,6 +55,11 @@ pkgver() { printf "r%s.%s" "$(git rev-list --count HEAD)" "$(git rev-parse --short HEAD)" } +prepare() { + cd "$_pkgname" + patch -p1 < ../sway.patch +} + build() { arch-meson \ -Dsd-bus-provider=libsystemd \
-
Build and install both packages:
cd wlroots-git makepkg -Csfi cd ../sway-git makepkg -Csfi
This compiled just fine with latest -git!
If I don't include patch --directory=wlroots -p1 < ../wlroots.patch in sway-git-wlroots-git/PKGBUILD I get the error from my comment above which confirms that Sway was never using my locally compiled Wlroots from earlier attempts?
I can't really say whether you were using your locally built one or not before honestly. But it makes sense that you'd need to patch wlroots too if you've bundled wlroots into the same package as sway at least. 🤷
Those build errors are entirely unrelated to the patch though. It doesn't modify anything that could cause those errors. It's possible the hashes you picked for wlroots and sway are just incompatible? If you switch to using the sway-git
and wlroots-git
packages instead they will clone the latest master
branch each time you build it, so you never have to update the hashes. Though atm the sway-git
package is broken in AUR, so you'd also have to fix that too:
Click to expand
diff --git a/PKGBUILD b/PKGBUILD
index b9c83cb..682099c 100644
--- a/PKGBUILD
+++ b/PKGBUILD
@@ -68,9 +75,9 @@ package() {
cd "$_pkgname"
install -Dm644 "LICENSE" "$pkgdir/usr/share/licenses/$pkgname/LICENSE"
- for util in autoname-workspaces.py inactive-windows-transparency.py grimshot; do
- install -Dm755 "contrib/$util" -t "$pkgdir/usr/share/$pkgname/scripts"
- done
}
post_upgrade() {
Edit: Actually the first set of errors are related I guess. They imply that you weren't building against the right version of wlroots yeah. If you weren't getting those errors before you must have used the correct version of it before too.
Thank you 🙏
The PKGBUILD for sway-git
has had several updates in the past few days.
Changes to get this to build:
- No need to remove the
autoname-workspaces.py
stuff - Use
$pkgname
instead of$_pkgname
inprepare
Is this gist still relevant?
There's a new approach to this issue here: swaywm/sway#6832 (comment)
Either way this gist can be kept for archival purposes 🙂
Oh thanks for the tip! I was directed to these patches somewhere and wasn't aware there's other work going on.
Glad to help
Also make sure to try it without direct scanout, made a huge difference for me
swaywm/sway#7714 (comment)
Heads up, this patch just broke with latest wlroots -git (7bf6c1fc) / sway -git (d84b383) @rhoot (I can compile it just fine without the patch)