From f97feb3ccf6b2eed9c7dcc0960b4872dbdaa1521 Mon Sep 17 00:00:00 2001 From: okan Date: Wed, 29 Jan 2014 21:13:52 +0000 Subject: Merge keybinding and mousebinding queues into using the same merged struct, binding; they were essentially the same accept for what was 'pressed', keysym or button. --- xevents.c | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) (limited to 'xevents.c') diff --git a/xevents.c b/xevents.c index 834a5ea..4a4532f 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.107 2014/01/28 13:40:40 okan Exp $ + * $OpenBSD: xevents.c,v 1.108 2014/01/29 21:13:52 okan Exp $ */ /* @@ -224,12 +224,12 @@ xev_handle_buttonpress(XEvent *ee) { XButtonEvent *e = &ee->xbutton; struct client_ctx *cc, fakecc; - struct mousebinding *mb; + struct binding *mb; e->state &= ~IGNOREMODMASK; TAILQ_FOREACH(mb, &Conf.mousebindingq, entry) { - if (e->button == mb->button && e->state == mb->modmask) + if (e->button == mb->press.button && e->state == mb->modmask) break; } @@ -263,7 +263,7 @@ xev_handle_keypress(XEvent *ee) { XKeyEvent *e = &ee->xkey; struct client_ctx *cc = NULL, fakecc; - struct keybinding *kb; + struct binding *kb; KeySym keysym, skeysym; unsigned int modshift; @@ -273,7 +273,7 @@ xev_handle_keypress(XEvent *ee) e->state &= ~IGNOREMODMASK; TAILQ_FOREACH(kb, &Conf.keybindingq, entry) { - if (keysym != kb->keysym && skeysym == kb->keysym) + if (keysym != kb->press.keysym && skeysym == kb->press.keysym) modshift = ShiftMask; else modshift = 0; @@ -281,7 +281,7 @@ xev_handle_keypress(XEvent *ee) if ((kb->modmask | modshift) != e->state) continue; - if (kb->keysym == (modshift == 0 ? keysym : skeysym)) + if (kb->press.keysym == (modshift == 0 ? keysym : skeysym)) break; } -- cgit v1.2.3-2-gb3c3