diff options
author | okan | 2016-10-18 17:03:30 +0000 |
---|---|---|
committer | okan | 2016-10-18 17:03:30 +0000 |
commit | a10bee93be3f2ad370a6dfc360e1b05cb84e7f5c (patch) | |
tree | 40fc7c400bfe2a07cc92331d68f6cb4a9a2f4c69 /mousefunc.c | |
parent | 7b0b231bfe9465d7b2f57f5257ea719325b36666 (diff) | |
download | cwm-a10bee93be3f2ad370a6dfc360e1b05cb84e7f5c.tar.gz |
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.c | 8 |
1 files changed, 5 insertions, 3 deletions
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 <sys/types.h> @@ -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; |