The problem is in this loop (file x.c, lines 1924:1938): /* Waiting for window mapping */ do { ... } while (ev.type != MapNotify);
To reproduce we need wm that allows assigning windows to workspace based on criteria. In i3wm it is done with: assign [title="^arad$"] 9 Then we can print current timestamp and immediately run terminal that should also print timestamp. If we wait a few seconds and switch to workspace that was assigned for this window, we will see timestamps differ. Command: date +%s && st -t arad -e bash -c 'date +%s; read' P.S. other terminals, as kitty and alacritty, works as expected, command executes immediately regardless of window being focused I've tried little hack and it worked for me, not hugely tested though. My patch: >From fa243fbaacbd51c567be757d41b4b0571c4d00b0 Mon Sep 17 00:00:00 2001 From: UnkwUsr <ktoto2707...@gmail.com> Date: Wed, 8 Nov 2023 18:01:16 +0300 Subject: [PATCH] fix: do not wait until window get first focus --- x.c | 1 + 1 file changed, 1 insertion(+) diff --git a/x.c b/x.c index b36fb8c..233879e 100644 --- a/x.c +++ b/x.c @@ -1934,6 +1934,7 @@ run(void) if (ev.type == ConfigureNotify) { w = ev.xconfigure.width; h = ev.xconfigure.height; + break; } } while (ev.type != MapNotify); -- 2.42.0