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.
This commit is contained in:
okan
2016-10-06 14:41:19 +00:00
parent 66f5360fd4
commit 987ee736b9
5 changed files with 82 additions and 87 deletions

View File

@@ -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;