New package: libwm-1.0

This commit is contained in:
Rasmus Thomsen 2019-03-31 10:18:47 +02:00 committed by maxice8
parent 06392dd038
commit ff4a56cd7d
2 changed files with 47 additions and 0 deletions

View file

@ -0,0 +1,34 @@
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
--- libwm.c
+++ 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
--- wm.h
+++ 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__ */

13
srcpkgs/libwm/template Normal file
View file

@ -0,0 +1,13 @@
# Template file for 'libwm'
pkgname=libwm
version=1.0
revision=1
build_style=gnu-makefile
makedepends="libxcb-devel"
depends="libxcb-devel"
short_desc="Small library for X windows manipulation"
maintainer="Rasmus Thomsen <oss@cogitri.dev>"
license="GPL-3.0-or-later"
homepage="https://github.com/wmutils/libwm"
distfiles="https://github.com/wmutils/libwm/archive/v${version}.tar.gz"
checksum=f56c940c5e2a4f8c0c8467b997c658d0077d0996d6f915c605fec90f79530aa0