From a10bee93be3f2ad370a6dfc360e1b05cb84e7f5c Mon Sep 17 00:00:00 2001 From: okan Date: Tue, 18 Oct 2016 17:03:30 +0000 Subject: 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. --- mousefunc.c | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) (limited to 'mousefunc.c') diff --git a/mousefunc.c b/mousefunc.c index a565be4..9af8e5a 100644 --- a/mousefunc.c +++ b/mousefunc.c @@ -16,7 +16,7 @@ * ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF * OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. * - * $OpenBSD: mousefunc.c,v 1.113 2016/10/06 14:41:19 okan Exp $ + * $OpenBSD: mousefunc.c,v 1.114 2016/10/18 17:03:30 okan Exp $ */ #include @@ -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; -- cgit v1.2.3-2-gb3c3