From 53c10d5987d418e17d3db1f853cf82b884f0009e Mon Sep 17 00:00:00 2001 From: Derek Stevens Date: Sat, 29 Feb 2020 13:04:01 -0500 Subject: [PATCH] restore unhide shortcut --- key.c | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/key.c b/key.c index 8bdc6ee..15586e7 100755 --- a/key.c +++ b/key.c @@ -39,6 +39,7 @@ keysetup(void) int tabcode = XKeysymToKeycode(dpy, XK_Tab); int dcode = XKeysymToKeycode(dpy, DESTROY_KEY); int icode = XKeysymToKeycode(dpy, ICON_KEY); + int ucode = XKeysymToKeycode(dpy, UNHIDE_KEY); int mcode = XKeysymToKeycode(dpy, MAX_KEY); int vcode = XKeysymToKeycode(dpy, MOVE_KEY); int rcode = XKeysymToKeycode(dpy, RESIZE_KEY); @@ -59,6 +60,7 @@ keysetup(void) XGrabKey(dpy, tabcode, Mod1Mask, screens[i].root, 0, GrabModeSync, GrabModeAsync); XGrabKey(dpy, dcode, SHORTCUTMOD, screens[i].root, 0, GrabModeSync, GrabModeAsync); XGrabKey(dpy, icode, SHORTCUTMOD, screens[i].root, 0, GrabModeSync, GrabModeAsync); + XGrabKey(dpy, ucode, SHORTCUTMOD, screens[i].root, 0, GrabModeSync, GrabModeAsync); XGrabKey(dpy, rcode, SHORTCUTMOD, screens[i].root, 0, GrabModeSync, GrabModeAsync); XGrabKey(dpy, vcode, SHORTCUTMOD, screens[i].root, 0, GrabModeSync, GrabModeAsync); XGrabKey(dpy, mcode, SHORTCUTMOD, screens[i].root, 0, GrabModeSync, GrabModeAsync); @@ -90,6 +92,7 @@ keypress(XKeyEvent *e) int tabcode = XKeysymToKeycode(dpy, XK_Tab); int dcode = XKeysymToKeycode(dpy, DESTROY_KEY); int icode = XKeysymToKeycode(dpy, ICON_KEY); + int ucode = XKeysymToKeycode(dpy, UNHIDE_KEY); int mcode = XKeysymToKeycode(dpy, MAX_KEY); int vcode = XKeysymToKeycode(dpy, MOVE_KEY); int rcode = XKeysymToKeycode(dpy, RESIZE_KEY); @@ -117,6 +120,8 @@ keypress(XKeyEvent *e) delete(current, 0); if (e->keycode == icode && (e->state&SHORTCUTMOD) == (MODBITS)) hide(current); + if (e->keycode == icode && (e->state&SHORTCUTMOD) == (MODBITS)) + unhide(hidden[0]); if (e->keycode == vcode && (e->state&SHORTCUTMOD) == (MODBITS)) move(current, Button3); if (e->keycode == rcode && (e->state&SHORTCUTMOD) == (MODBITS))