void-packages/srcpkgs/libwm/patches/wm-reg-event.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

34 lines
817 B
Diff

Upstream is dead and they haven't made a new release with this in it.
diff --git libwm.c libwm.c
index 247326d..b9e689a 100644
--- a/libwm.c
+++ b/libwm.c
@@ -344,3 +344,12 @@ wm_set_focus(xcb_window_t wid)
xcb_flush(conn);
return 1;
}
+
+int
+wm_reg_event(xcb_window_t wid, uint32_t mask)
+{
+ uint32_t val[] = { mask };
+
+ xcb_change_window_attributes(conn, wid, XCB_CW_EVENT_MASK, val);
+ return 0;
+}
diff --git wm.h wm.h
index dce6279..c6b93e2 100644
--- a/wm.h
+++ b/wm.h
@@ -185,4 +185,10 @@ int wm_resize(xcb_window_t wid, int mode, int w, int h);
*/
int wm_restack(xcb_window_t wid, uint32_t mode);
+/*
+ * Register the given event(s) on the window.
+ * Multiple events can be registered by ORing them together
+ */
+int wm_reg_event(xcb_window_t wid, uint32_t mask);
+
#endif /* __LIBWM_H__ */