diff options
Diffstat (limited to 'dwl.c')
-rw-r--r-- | dwl.c | 14 |
1 files changed, 14 insertions, 0 deletions
@@ -386,6 +386,7 @@ static void togglefloating(const Arg *arg); static void togglefullscreen(const Arg *arg); static void togglegaps(const Arg *arg); static void togglepointerconstraints(const Arg *arg); +static void togglepassthrough(const Arg *arg); static void toggletag(const Arg *arg); static void toggleview(const Arg *arg); static void unlocksession(struct wl_listener *listener, void *data); @@ -704,6 +705,11 @@ buttonpress(struct wl_listener *listener, void *data) for (b = buttons; b < END(buttons); b++) { if (CLEANMASK(mods) == CLEANMASK(b->mod) && event->button == b->button && b->func) { + if (passthrough) { + if (b->func != togglepassthrough) continue; + b->func(&b->arg); + break; + } b->func(&b->arg); return; } @@ -1961,6 +1967,8 @@ keybinding(uint32_t mods, xkb_keysym_t sym) for (k = keys; k < END(keys); k++) { if (CLEANMASK(mods) == CLEANMASK(k->mod) && sym == k->keysym && k->func) { + if (passthrough && k->func != togglepassthrough) + continue; k->func(&k->arg); return 1; } @@ -3191,6 +3199,12 @@ togglepointerconstraints(const Arg *arg) } void +togglepassthrough(const Arg *arg) +{ + passthrough = !passthrough; +} + +void toggletag(const Arg *arg) { uint32_t newtags; |