From ff4a56cd7d0582d8c34e50fb3938dc2c97c88757 Mon Sep 17 00:00:00 2001 From: Rasmus Thomsen Date: Sun, 31 Mar 2019 10:18:47 +0200 Subject: [PATCH] New package: libwm-1.0 --- srcpkgs/libwm/patches/wm-reg-event.patch | 34 ++++++++++++++++++++++++ srcpkgs/libwm/template | 13 +++++++++ 2 files changed, 47 insertions(+) create mode 100644 srcpkgs/libwm/patches/wm-reg-event.patch create mode 100644 srcpkgs/libwm/template diff --git a/srcpkgs/libwm/patches/wm-reg-event.patch b/srcpkgs/libwm/patches/wm-reg-event.patch new file mode 100644 index 0000000000..ca21171868 --- /dev/null +++ b/srcpkgs/libwm/patches/wm-reg-event.patch @@ -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__ */ diff --git a/srcpkgs/libwm/template b/srcpkgs/libwm/template new file mode 100644 index 0000000000..b555c29e6d --- /dev/null +++ b/srcpkgs/libwm/template @@ -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 " +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