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.
This commit is contained in:
okan
2016-10-18 17:03:30 +00:00
parent 38eac7d7e9
commit 0bb1be86c6
10 changed files with 512 additions and 509 deletions

View File

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