dwm-plugins: fix vibration test, AT debug channel, and Close softkey leak

This commit is contained in:
Luxferre
2026-10-24 21:11:57 +03:00
parent f394d2b135
commit 5646f03ebe
21 changed files with 160 additions and 54 deletions
+13
View File
@@ -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);