mirror of
https://github.com/mintycube/dwm.git
synced 2024-10-22 14:05:45 +02:00
[dwm][patch] holdbar: fixed flickering caused by repeated key events
This commit is contained in:
parent
7094852845
commit
f2673fec53
@ -20,6 +20,16 @@ holdbar(const Arg *arg)
|
|||||||
void
|
void
|
||||||
keyrelease(XEvent *e)
|
keyrelease(XEvent *e)
|
||||||
{
|
{
|
||||||
|
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;
|
||||||
|
}
|
||||||
|
}
|
||||||
if (e->xkey.keycode == XKeysymToKeycode(dpy, HOLDKEY)) {
|
if (e->xkey.keycode == XKeysymToKeycode(dpy, HOLDKEY)) {
|
||||||
selmon->showbar = 0;
|
selmon->showbar = 0;
|
||||||
updateholdbarpos(selmon);
|
updateholdbarpos(selmon);
|
||||||
|
Loading…
Reference in New Issue
Block a user