I have experienced the following bug on both arch linux and void linux.
dmenu and dwm are both installed with config.h equal to config.def.h.
I run the following shell command:
seq 2 | dmenu && seq 3 | dmenu
The first dmenu instance opens as expected. I hit the enter key and a 1
is printed. However, the second dmenu instance does not appear. It
remains invisible, but still accepts my keyboard input, behaving as if
it were visible. I hit enter again, what I typed is printed and the
shell command terminates with exit code 0.
By trial and error, I found that adding a 'sleep(1);' line into dmenu.c
before the existing XCreateIC call in the setup function will cause the
second dmenu instance to become visible after the 1 seconds
pause. However, if the 'sleep(1);' line is added after the XCreateIC
call, then the second dmenu instance will remain invisible even after
the 1 second. This suggests the problem is related to the creation of
the input context, but I don't know enough about XLib to fix this
problem on my own.
PS. I noticed there is no call to XDestroyIC, is this intentional?
--
Christopher
Received on Thu Sep 21 2023 - 15:02:12 CEST