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



On Sun, Jul 28, 2002 at 07:59:14PM +0100, Mark McLoughlin wrote:
> On Thu, 25 Jul 2002, Gregory Merchan wrote:
> 
> > 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.
> 
> 	No, this tells you if *a* settings daemon is running. But
> that's irrelevant here, because the capplets don't use the
> _XSETTINGS_SETTINGS property, they use gconf. So, you need to
> specifically know that gnome-settings-daemon is running.

That's easy enough. Add a target like _GNOME_SETTINGS_VERSION of INTEGER[]
type to the _XSETTINGS_Sn owner of g-s-d. (What's required for this should
be documented.) Then request conversion of the selection to that target.
If conversion fails, g-s-d isn't running. If it succeeds, then you can
check the value to see if the settings daemon does what you need it to do.
You could use some stringy target like a name, but why compare strings
when you can use ints?

But alas, despite it being the standard method, everyone hates proper
selection handling, so you'll probably want to add a property to the
owner window instead. Adding one to the root window would be eat cycles
as every root listener will be processing a change. Using a pid won't
work remotely without more trouble than merit.

In any case, the expectations of g-s-d need to be documented.


Cheers,
Greg Merchan



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