On Sun, 01 Jul 2012 18:03:17 +0800, Michael Stapelberg <michael@xxxxxxxx>
wrote:
Hi,That's right, and I'm aware of that. And that's why I made this patch, which block those events until tree_render() has been actually called.
Quoting DR (2012-07-01 09:28:51)
> PS. I have had a little thought about the situation you suggest where XActually, ipc_send_event("workspace", …) is called in _workspace_show in
> representation is not changed after tree_render(). Wouldn't the unmap
command
> sent by i3bar queued after those sent by i3 in Xorg buffer? If so, it
won't be
> a problem.
You cannot make this assumption because of how i3 and i3bar might get
scheduled on your CPU.
But can you explain this a little further? All the workspaces events is sent
after the render commands have been sent to Xorg. So what schedule would make
i3bar's unmap command arrive before i3's render commands?
src/workspace.c, which is called before tree_render() is called (see
src/commands.c:cmd_workspace for example).
So, i3bar can get the IPC event before i3 even sends the commands to
Xorg and thus it can send an unmap.
Best regards,
Michael