On Fri, Sep 22, 2023 at 12:22:25PM +0100, Christopher Lang wrote: > I'm guessing that when the second dmenu opens, the first one is still > fading out and this stops XCreateIC from working as intended?
Worth noting that according to the docs XCreateIC() may return NULL - something that isn't checked for in dmenu. Perhaps you're getting a NULL ic due to your config? Does the attached patch make any difference? - NRK
>From defc910ce1fa51e3031af19abae8c70b3b8b8106 Mon Sep 17 00:00:00 2001 From: NRK <n...@disroot.org> Date: Fri, 22 Sep 2023 23:42:10 +0600 Subject: [PATCH] check for XCreateIC failure --- dmenu.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/dmenu.c b/dmenu.c index 40f93e0..a38e7b5 100644 --- a/dmenu.c +++ b/dmenu.c @@ -696,6 +696,8 @@ setup(void) xic = XCreateIC(xim, XNInputStyle, XIMPreeditNothing | XIMStatusNothing, XNClientWindow, win, XNFocusWindow, win, NULL); + if (xic == NULL) + die("XCreateIC failed"); XMapRaised(dpy, win); if (embed) { -- 2.41.0