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))