dwm-plugins: fix vibration test, AT debug channel, and Close softkey leak
This commit is contained in:
@@ -1110,6 +1110,19 @@ int runModemApp(int argc, char** argv) {
|
||||
|
||||
auto hideWindow = [&]() {
|
||||
if (!visible) return;
|
||||
int xfdLocal = ConnectionNumber(dpy);
|
||||
int64_t drainDeadline = nowMs() + 180;
|
||||
while (nowMs() < drainDeadline && querySoftkeysDown(dpy) != 0) {
|
||||
while (XPending(dpy) > 0) {
|
||||
XEvent ev;
|
||||
XNextEvent(dpy, &ev);
|
||||
}
|
||||
struct pollfd pfd {};
|
||||
pfd.fd = xfdLocal;
|
||||
pfd.events = POLLIN;
|
||||
::poll(&pfd, 1, 10);
|
||||
}
|
||||
writeSoftkeySuppress(nowMs() + 450);
|
||||
XUngrabKeyboard(dpy, CurrentTime);
|
||||
XUnmapWindow(dpy, win);
|
||||
XFlush(dpy);
|
||||
|
||||
Reference in New Issue
Block a user