From 9d358af1dd11a75cf4778e096df8f52cb1ca690b Mon Sep 17 00:00:00 2001 From: okan Date: Thu, 6 Oct 2016 14:41:19 +0000 Subject: Add an argument to the callbacks to pass the xevent context, button or key press. This allows to remove a few hacks to duplicate functions only for behaviour changes; now differing behaviours are pushed down to the callback. Also will allow for previously unavailable actions to be bind-able down the road. --- mousefunc.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'mousefunc.c') diff --git a/mousefunc.c b/mousefunc.c index bc451e3..a565be4 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.112 2016/10/03 13:52:18 okan Exp $ + * $OpenBSD: mousefunc.c,v 1.113 2016/10/06 14:41:19 okan Exp $ */ #include @@ -33,7 +33,7 @@ #include "calmwm.h" void -mousefunc_client_resize(struct client_ctx *cc, union arg *arg) +mousefunc_client_resize(struct client_ctx *cc, union arg *arg, int xev) { XEvent ev; Time ltime = 0; @@ -88,7 +88,7 @@ mousefunc_client_resize(struct client_ctx *cc, union arg *arg) } void -mousefunc_client_move(struct client_ctx *cc, union arg *arg) +mousefunc_client_move(struct client_ctx *cc, union arg *arg, int xev) { XEvent ev; Time ltime = 0; -- cgit v1.2.3-2-gb3c3