aboutsummaryrefslogtreecommitdiffstats
path: root/xevents.c
diff options
context:
space:
mode:
authorokan2016-10-06 14:41:19 +0000
committerokan2016-10-06 14:41:19 +0000
commit9d358af1dd11a75cf4778e096df8f52cb1ca690b (patch)
tree9e40148cf90de010622f87a77f515231ffaf5a21 /xevents.c
parent97f575bc42f2f8f9458adf55d1fc29e8bd021c83 (diff)
downloadcwm-9d358af1dd11a75cf4778e096df8f52cb1ca690b.tar.gz
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.c6
1 files changed, 3 insertions, 3 deletions
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);
}
/*