Re: nautilus vs. gnome-settings-daemon "race"



On Thu, Jul 25, 2002 at 11:21:55PM +0100, Mark McLoughlin wrote:
> On 25 Jul 2002, jacob berkman wrote:
> 
> > On Thu, 2002-07-25 at 01:38, Mark McLoughlin wrote:
> > > Hi Jacob,
> > >
> > > On 24 Jul 2002, jacob berkman wrote:
> > >
> > > > what do the capplets contact g-s-d for, other than to make sure it's
> > > > running so the settings will actually change?
> > >
> > > 	Indeed, I hadn't realised that SettingsDaemon::awake was
> > > basically a no-op. Now I see absolutely no reason for Bonobo to be
> > > involved. It would be very easy for the capplets to use another method
> > > to see if g-s-d is running and start it if not, would it not ?
> >
> > well bonobo-activation is just supposed to work, so any other code adds
> > the possibility that it doesn't work...
> 
> 	Except that, because bonobo-activation is a component
> activation framework and not a generic start this program if not
> running service, it doesn't work very well :-)
> >
> > although in this case one could probably do it with an x property dingus
> > pretty easily.
> 
> 	Sure, or a .pid file dodah thingy :-)

You check to see if the settings daemon is running by getting the owner
of the _XSETTINGS_Sn (where n is the screen number) selection.

You are notified that it has started by a message which is sent to the root
window as:
  event-mask:   StructureNotify
  event:        ClientMessage
  type:         MANAGER
  format:       32
  data[0]:      timestamp
  data[1]:      _XSETTINGS_S[N] (atom)
  data[2]:      New owner of the selection
  data[3]:      0 (reserved)

You know the settings daemon has stopped when the owner window is destroyed.

This is all documented at:
  http://www.freedesktop.org/standards/xsettings/xsettings.html


Cheers,
Greg Merchan



[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]