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. --- xevents.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'xevents.c') diff --git a/xevents.c b/xevents.c index f2ecfe8..1c1b043 100644 --- a/xevents.c +++ b/xevents.c @@ -15,7 +15,7 @@ * ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF * OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. * - * $OpenBSD: xevents.c,v 1.124 2016/10/04 20:15:55 okan Exp $ + * $OpenBSD: xevents.c,v 1.125 2016/10/06 14:41:19 okan Exp $ */ /* @@ -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); } /* -- cgit v1.2.3-2-gb3c3