summary refs log tree commit diff
path: root/mousefunc.c
diff options
context:
space:
mode:
authorokan <okan>2016-10-18 17:03:30 +0000
committerokan <okan>2016-10-18 17:03:30 +0000
commit0bb1be86c69ea95103e1a6b38c093406a47cdb07 (patch)
treeb7aa2c4a5a2c09bb20637f0c50dd4c01377abda0 /mousefunc.c
parent38eac7d7e9d36243271eb7f968a3152c9eb0cfbc (diff)
downloadcwm-0bb1be86c69ea95103e1a6b38c093406a47cdb07.tar.gz
cwm-0bb1be86c69ea95103e1a6b38c093406a47cdb07.tar.xz
cwm-0bb1be86c69ea95103e1a6b38c093406a47cdb07.zip
Refactor callbacks to take a void * so as to not try and generalize into
client_ctx in keypress and buttonpress event handlers; pass appropriate *ctx's
based on context.

While here, limit some globals, replace defines with appropriate variables and
fix some naming.
Diffstat (limited to 'mousefunc.c')
-rw-r--r--mousefunc.c6
1 files changed, 4 insertions, 2 deletions
diff --git a/mousefunc.c b/mousefunc.c
index 27b1d65..23c5c42 100644
--- a/mousefunc.c
+++ b/mousefunc.c
@@ -33,8 +33,9 @@
 #include "calmwm.h"
 
 void
-mousefunc_client_resize(struct client_ctx *cc, union arg *arg, int xev)
+mousefunc_client_resize(void *ctx, union arg *arg, enum xev xev)
 {
+	struct client_ctx	*cc = ctx;
 	XEvent			 ev;
 	Time			 ltime = 0;
 	struct screen_ctx	*sc = cc->sc;
@@ -88,8 +89,9 @@ mousefunc_client_resize(struct client_ctx *cc, union arg *arg, int xev)
 }
 
 void
-mousefunc_client_move(struct client_ctx *cc, union arg *arg, int xev)
+mousefunc_client_move(void *ctx, union arg *arg, enum xev xev)
 {
+	struct client_ctx	*cc = ctx;
 	XEvent			 ev;
 	Time			 ltime = 0;
 	struct screen_ctx	*sc = cc->sc;