Session Management Proposal
Oswald Buddenhagen
ossi at kde.org
Sat Jan 3 03:08:34 EET 2004
On Fri, Jan 02, 2004 at 02:41:57PM -1000, Ray Strode wrote:
> Oswald Buddenhagen wrote:
> >hmm, that's not strictly a bad thing, unless we have the requirement not
> >to change libSM - at least it makes sure, that no app currently uses
> >something different.
> >
> >
> Changing libSM means either trying to convince XFree86, and Sun, and
> all the other vendors that ship X to apply our patch, or shipping our own
> libSM replacement with the desktop environments. Doing the first
> thing is going to be very hard and if we're going to do the second thing
> then we might as well add new API. Personally, I think it may just be
> simpler to work within the means provided already (Namely, properties
> and defining our interpretation of message arguments).
>
hmmm ... okay. :)
> > one could simply put a version at the beginning of the
> > data.
>
> So you're saying instead of copying the /struct/ bit-for-bit into
> the ARRAY8 (which has padding/alignment issues), you would rather copy
> each /field/ bit-for-bit (ignoring all padding).
>
yup
> Implementing that is going to be really messy.
>
not any more than any other protocol ... i have no particular problem
with it.
the lack of CARD32 already enforces some explicit serialization ...
> > both solutions (n properties or n fields in one property) have their
> > downsides - i think the "stream" solution is cleaner.
> Conceptually it's cleaner to say "these properties are grouped", but
> it complicates implementation quite a bit with no real added benefit.
>
i don't think it complicates "quite a bit", but i'm not religious about
that matter.
> > note, that this dialog can contain confirmation, type (and
> > conditions/timing) selection and the option to whether the current
> > session should be saved, so maybe you can come up with some more
> > generic name. ShutdownDialog sounds most correct,
> _DSME_ShutdownDialog with _DSME_ShutdownDialogShow,
> _DSME_ShutdownDialogNone, and _DSME_ShutdownDialogDefault is fine
> with me.
>
i don't particularily like it, because the names are inconsistent. i'd
go with Always, Never, Default.
> > but about any
> > naming clashes with interact-mode somehow - after all, they're very
> > similar, just that one applies to the session manager, while the
> > other to the managed clients. i'd still prefer to (ab)use the fast
> > flag, as it seems to be exactly the right thing - just that we have
> > the choice to patch libSM or abandon the Always mode.
> Abandoning the Always mode is fine me with.
> fast = False means what _DSME_ShutdownDialogNone would have.
> fast = True means what _DSME_ShutdownDialogDefault would have.
>
> Is there ever a time when a client would want a shutdown dialog
> against the user's settings? No, I can't really think of one, so two
> states is fine.
>
i actually can't as well ... dunno.
> Okay, so actually interact-style is sufficient for what we need.
>
> interact-sytle = Any (Session manager decides based on user
> configuration)
> interact-style = None/Errors (Do not have "do you want to save?"
> dialogs)
>
> There is never a situation where the a client should be able to
> request "Do you want to save?" dialogs if the user has it turned
> off.
>
sounds reasonable.
> (Again, though, GNOME probably won't make it a configuration
> option to begin with).
>
kde, either, i guess ...
> okay so to summarize:
>
> _DSME_ShutdownType stays, but everything else goes.
>
> When the client sends SaveYourselfRequest, both fast and
> interact-style are significant. They each specify whether the
> session manager should follow user settings or be completely
> uninteractive.
>
> fast = False means display a ShutdownDialog if the user has
> ShutdownDialog's configured to be shown.
>
> fast = True means don't display a ShutdownDialog, the client has
> already secified specifically how they want to
> shutdown.
>
> interact-style = Any means display
> "Do you want to save document 'foo'?"
> if the user has save confirm dialogs
> configured to be shown on logout.
> interact-style = Errors means display
> "There was an error saving document
> "'foo', do you want to cancel
> shutdown?" if there is an error, but
> otherwise don't display save-confirm
> dialogs.
> interact-style = None means don't display save-confirm dialogs.
>
i'd change the save-confirm to any, making clear that errors are
not shown, too.
> Sound good?
>
fine with me.
ShutdownTimeout (CARD32) and ShutdownTimeoutAction (CARD8 - enum {
Cancel, Force }) would be next, but that's not set in stone, yet, and
can wait for the next revision. :)
greetings
--
Hi! I'm a .signature virus! Copy me into your ~/.signature, please!
--
Chaos, panic, and disorder - my work here is done.
More information about the xdg
mailing list