From 905535649273a456101caa2811abfed2c65774eb Mon Sep 17 00:00:00 2001 From: okan Date: Sun, 19 May 2013 17:02:04 +0000 Subject: use XGetWMProtocols and simplify WM_PROTOCOL handling --- calmwm.h | 11 +++++++---- 1 file changed, 7 insertions(+), 4 deletions(-) (limited to 'calmwm.h') diff --git a/calmwm.h b/calmwm.h index ca5b6c1..4684929 100644 --- a/calmwm.h +++ b/calmwm.h @@ -15,7 +15,7 @@ * ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF * OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. * - * $OpenBSD: calmwm.h,v 1.199 2013/05/14 12:35:56 okan Exp $ + * $OpenBSD: calmwm.h,v 1.200 2013/05/19 17:02:04 okan Exp $ */ #ifndef _CALMWM_H_ @@ -121,6 +121,11 @@ struct winname { }; TAILQ_HEAD(winname_q, winname); +enum wm_protocols { + _WM_DELETE_WINDOW = 0x0001, + _WM_TAKE_FOCUS = 0x0002, +}; + struct client_ctx { TAILQ_ENTRY(client_ctx) entry; TAILQ_ENTRY(client_ctx) group_entry; @@ -147,9 +152,7 @@ struct client_ctx { int x; /* x position */ int y; /* y position */ } ptr; -#define CLIENT_PROTO_DELETE 0x0001 -#define CLIENT_PROTO_TAKEFOCUS 0x0002 - int xproto; + enum wm_protocols xproto; #define CLIENT_HIDDEN 0x0001 #define CLIENT_IGNORE 0x0002 #define CLIENT_VMAXIMIZED 0x0004 -- cgit v1.2.3-2-gb3c3