2019-10-01 22:03:21 +00:00
|
|
|
void
|
|
|
|
holdbar(const Arg *arg)
|
|
|
|
{
|
2020-06-30 08:15:36 +00:00
|
|
|
if (selmon->showbar)
|
|
|
|
return;
|
2020-07-18 16:59:03 +00:00
|
|
|
Bar *bar;
|
2020-06-30 08:15:36 +00:00
|
|
|
selmon->showbar = 2;
|
2020-07-18 16:59:03 +00:00
|
|
|
updatebarpos(selmon);
|
|
|
|
for (bar = selmon->bar; bar; bar = bar->next)
|
|
|
|
XMoveResizeWindow(dpy, bar->win, bar->bx, bar->by, bar->bw, bar->bh);
|
2019-10-01 22:03:21 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
void
|
|
|
|
keyrelease(XEvent *e)
|
|
|
|
{
|
2020-07-18 16:59:03 +00:00
|
|
|
Bar *bar;
|
2020-03-29 10:57:07 +00:00
|
|
|
if (XEventsQueued(dpy, QueuedAfterReading)) {
|
|
|
|
XEvent ne;
|
|
|
|
XPeekEvent(dpy, &ne);
|
|
|
|
|
|
|
|
if (ne.type == KeyPress && ne.xkey.time == e->xkey.time &&
|
|
|
|
ne.xkey.keycode == e->xkey.keycode) {
|
|
|
|
XNextEvent(dpy, &ne);
|
|
|
|
return;
|
|
|
|
}
|
|
|
|
}
|
2020-06-30 08:15:36 +00:00
|
|
|
if (e->xkey.keycode == XKeysymToKeycode(dpy, HOLDKEY) && selmon->showbar == 2) {
|
2019-10-01 22:03:21 +00:00
|
|
|
selmon->showbar = 0;
|
2020-07-18 16:59:03 +00:00
|
|
|
updatebarpos(selmon);
|
|
|
|
for (bar = selmon->bar; bar; bar = bar->next)
|
|
|
|
XMoveResizeWindow(dpy, bar->win, bar->bx, bar->by, bar->bw, bar->bh);
|
2019-10-01 22:03:21 +00:00
|
|
|
arrange(selmon);
|
|
|
|
}
|
2019-10-07 22:54:06 +00:00
|
|
|
#if COMBO_PATCH
|
|
|
|
combo = 0;
|
|
|
|
#endif // COMBO_PATCH
|
2021-06-14 05:16:17 +00:00
|
|
|
}
|
|
|
|
|