wmIsRunning bit in the server

Jeremy Huddleston 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...  
>>> otherwise
>>> the user's xterm isn't as pretty as they want it.
>>
>> Hmm, that's almost convincing :-) As a random idea, what if you  
>> simply
>> 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  
>> manager
>> anyways)
>
> My question would be how you'd know the window manager is the thing
> trying to connect, since xinitrc potentially runs lots of other  
> things.
> 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  
> _that_
> you can know because you can get the peer creds from launchd or
> whatever.

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  
handled ~/.Xresources)

> 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  
> hook
> into it.

Beautiful.  That's what I was looking for.  Thanks!


-------------- next part --------------
A non-text attachment was scrubbed...
Name: smime.p7s
Type: application/pkcs7-signature
Size: 3040 bytes
Desc: not available
URL: <http://lists.x.org/archives/xorg/attachments/20080825/ce686e1f/attachment.bin>


More information about the xorg mailing list