diff options
author | okan <okan> | 2016-10-06 14:41:19 +0000 |
---|---|---|
committer | okan <okan> | 2016-10-06 14:41:19 +0000 |
commit | 987ee736b92ec889391283624d84cc6cc87c8c1a (patch) | |
tree | 50edaea87e5eb23d2ccf90fa3a5c3bb558121244 /xevents.c | |
parent | 66f5360fd48401a1d8ac204e36567597a3974164 (diff) | |
download | cwm-987ee736b92ec889391283624d84cc6cc87c8c1a.tar.gz cwm-987ee736b92ec889391283624d84cc6cc87c8c1a.tar.xz cwm-987ee736b92ec889391283624d84cc6cc87c8c1a.zip |
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.
Diffstat (limited to 'xevents.c')
-rw-r--r-- | xevents.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/xevents.c b/xevents.c index 3dab168..3388063 100644 --- a/xevents.c +++ b/xevents.c @@ -244,7 +244,7 @@ xev_handle_buttonpress(XEvent *ee) return; } - (*mb->callback)(cc, &mb->argument); + (*mb->callback)(cc, &mb->argument, CWM_BTN); } static void @@ -298,7 +298,7 @@ xev_handle_keypress(XEvent *ee) return; } - (*kb->callback)(cc, &kb->argument); + (*kb->callback)(cc, &kb->argument, CWM_KEY); } /* |