[PATCH] Third and Final (hopefully)
Havoc Pennington
hp at redhat.com
Tue Nov 8 20:54:35 PST 2005
On Wed, 2005-11-09 at 02:57 +0000, Robert McQueen wrote:
> To me, going with ALLOW_REPLACEMENT and switching DO_NOT_QUEUE to
> ALLOW_QUEUE would make the behaviour the most intuitive. Baseline is:
> when you get a name, it's yours, and nobody else can get it, and if they
> try then they fail. If you want to deviate from this functionality, you
> may choose to allow other people to usurp you, or you may choose to wait
> for someone to move off a name, which indicates a commitment that you
> will monitor the signals and behave appropriately in these cases.
One rationale was that the defaults are the things you don't have to
write code for. i.e. to handle DO_NOT_QUEUE you need to detect the error
trying to get the name and exit or something; to handle
ALLOW_REPLACEMENT you have to watch and notice when you're replaced.
The other thing to consider is what are the use-cases, i.e. the defaults
should be for some common scenario (the "several different text editors"
example maybe) and the non-defaults are for some other setup.
I don't think "no replacement" and "no queue" is right for the text
editor scenario, so it isn't a good default if we anticipate that as the
most common scenario.
Another scenario is "unique application" where if the name is already
owned you want to pass on the new windows to open and exit, otherwise
you own the name. In this case you want "no queue" / "no replacement"
probably. But you also have to write some tricky code and there's
probably going to be a library function that deals with it (already is
in KDE)
Don't remember the other scenarios... maybe someone wrote them down
somewhere ? ;-)
Havoc
More information about the dbus
mailing list