void-packages/srcpkgs/lxappearance/patches/fix-wayland.patch
Đoàn Trần Công Danh 861ac185a6 srcpkgs/l*: convert patches to -Np1
```sh
git grep -l '^patch_args=-Np0' "srcpkgs/$1*/template" |
while read template; do
	for p in ${template%/template}/patches/*; do
		sed -i '
			\,^[+-][+-][+-] /dev/null,b
			/^[*-]\+ [0-9]\+\(,[0-9]\+\)\? [*-]\+$/b
			s,^[*][*][*] ,&a/,
			/^--- /{
				s,\(^--- \)\(./\)*,\1a/,
				s,[.][Oo][Rr][Ii][Gg]\([	/]\),\1,
				s/[.][Oo][Rr][Ii][Gg]$//
				s/[.]patched[.]\([^.]\)/.\1/
				h
			}
			/^+++ -/{
				g
				s/^--- a/+++ b/
				b
			}
			s,\(^+++ \)\(./\)*,\1b/,
		' "$p"
	done
	sed -i '/^patch_args=/d' $template
done
```
2021-06-20 13:17:29 +07:00

21 lines
622 B
Diff

commit df82dc59c7b3ef5fa65898cbdd459d1fb8f3c9bf
Author: q66 <daniel@octaforge.org>
Date: Mon Feb 15 19:45:23 2021 +0100
fix segfault under wayland
diff --git src/lxappearance.c src/lxappearance.c
index a4b7db3..b6441ae 100644
--- a/src/lxappearance.c
+++ b/src/lxappearance.c
@@ -86,6 +86,10 @@ static gboolean check_lxde_dbus()
static void check_lxsession()
{
+ /* on wayland, avoid touching X bits */
+ if (g_getenv("WAYLAND_DISPLAY"))
+ return;
+
lxsession_atom = XInternAtom( GDK_DISPLAY_XDISPLAY(gdk_display_get_default()), "_LXSESSION", True );
if( lxsession_atom != None )
{