wmIsRunning bit in the server
jeremyhu at freedesktop.org
Mon Aug 25 15:37:12 PDT 2008
>>> Well, this is for a special situation that's really OS-X specific.
>>> The server is triggered to start when an X11 client connects to the
>>> $DISPLAY socket. This triggers startx to run and start the server
>>> which accepts the initial connection from this socket. We want to
>>> only accept that connection after the wm is running (yes, it's a
>>> kludge) because we want xinitrc to process ~/.Xresources...
>>> the user's xterm isn't as pretty as they want it.
>> Hmm, that's almost convincing :-) As a random idea, what if you
>> didn't actually map toplevel windows unless they were either
>> override-redirect or marked with a special property set by the window
>> manager? (I assume that you have to use a patched/custom window
> My question would be how you'd know the window manager is the thing
> trying to connect, since xinitrc potentially runs lots of other
> I suppose the answer is that you don't care so much about that, just
> about deferring the initial connection until after wm launch, and
> you can know because you can get the peer creds from launchd or
Well xinitrc is actually connecting over the non-launchd socket (ie
DISPLAY=:0 as set by xinit).
I'm essentially delaying handing off the launchd socket to the Xserver
until after the wm is running. Multiple things are run by xinitrc,
but quartz-wm is the last one (thus if it's running, we know xrdb has
> There's already an internal callback chain for setting selection
> ownership. See the CallSelectionCallback at the bottom of
> ProcSetSelectionOwner, and xfixes/select.c for an example of how to
> into it.
Beautiful. That's what I was looking for. Thanks!
-------------- next part --------------
A non-text attachment was scrubbed...
Size: 3040 bytes
Desc: not available
More information about the xorg