XUngrabKeyboard() instead of XUngrabKey() b1e217b2
XUngrabKey(), which is currently used in cleanup(), is not the right
counterpart to XGrabKeyboard(), which is used in grabkeyboard(),
called from main().

XUngrabKeyboard() is the function to use, as grabbing the whole
keyboard is different to grabbing individual keys.

With the current code the keyboard gets ungrabbed, as far as I can tell,
only by the final XCloseDisplay() in cleanup(), as the XUngrabKey()
there effectively does nothing.
Adam Purkrt · 2025-03-15 19:53 1 file(s) · +1 −1
dmenu.c +1 −1
100 100
{
101 101
	size_t i;
102 102
103 -
	XUngrabKey(dpy, AnyKey, AnyModifier, root);
103 +
	XUngrabKeyboard(dpy, CurrentTime);
104 104
	for (i = 0; i < SchemeLast; i++)
105 105
		free(scheme[i]);
106 106
	for (i = 0; items && items[i].text; ++i)