Re: [i3] [PATCH] Block outward events while processing commands.

  • From: Raven <drdarkraven@xxxxxxxxx>
  • To: "Discussions/Questions about the i3 window manager" <i3-discuss@xxxxxxxxxxxxx>
  • Date: Sun, 01 Jul 2012 18:07:07 +0800

On Sun, 01 Jul 2012 18:03:17 +0800, Michael Stapelberg <michael@xxxxxxxx> wrote:

Hi,

Quoting DR (2012-07-01 09:28:51)
> PS. I have had a little thought about the situation you suggest where X
> 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?
Actually, ipc_send_event("workspace", …) is called in _workspace_show in
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.
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.


Best regards,
Michael


--
Using Opera's revolutionary email client: http://www.opera.com/mail/

Other related posts: