void-packages/srcpkgs/xst/patches/xrdb_cursor.patch
Đoàn Trần Công Danh 3353bf4722 srcpkgs/x*: 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

40 lines
1 KiB
Diff

From a0894b52af4ee6cba42e93a2a756a2092ee46e48 Mon Sep 17 00:00:00 2001
From: Yauhen Kirylau <actionless.loveless@gmail.com>
Date: Fri, 11 Dec 2020 22:41:07 +0100
Subject: [PATCH] fix(x: main): do xrdb_load before setting cursor shape (fixes
#127) (#129)
* fix(x: main): do xrdb_load before setting cursor shape (fixes #127)
* fix(x: main): do xrdb_load and xsetcursor after parsing cli args
---
x.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git x.c x.c
index 4dcb168..5367d05 100644
--- a/x.c
+++ b/x.c
@@ -2111,7 +2111,6 @@ main(int argc, char *argv[])
{
xw.l = xw.t = 0;
xw.isfixed = False;
- xsetcursor(cursorshape);
ARGBEGIN {
case 'a':
@@ -2167,12 +2166,13 @@ main(int argc, char *argv[])
if (!opt_title)
opt_title = (opt_line || !opt_cmd) ? "xst" : opt_cmd[0];
+ xrdb_load();
+ xsetcursor(cursorshape);
setlocale(LC_CTYPE, "");
XSetLocaleModifiers("");
cols = MAX(cols, 1);
rows = MAX(rows, 1);
tnew(cols, rows);
- xrdb_load();
xinit(cols, rows);
xsetenv();
selinit();