XfceSMClient progress

Brian J. Tarricone brian at tarricone.org
Thu Sep 17 09:28:11 CEST 2009


Hi guys,

So I decided to drop support for SmRestartAnyway and SmRestartNever for
the reasons I mentioned before (better for apps to use XDG autostart for
that).  Any objections?

I'm thinking about making things even simpler.  Any objections to the
following?

1.  Don't expose the DiscardCommand (command used to remove saved state
for that instance of the app).  We have xfce_sm_client_get_state_file(),
which automatically sets DiscardCommand to "rm -f $STATE_FILE".  If you
don't want to use _get_state_file(), you can encode state in the app's
RestartCommand (via xfce_sm_client_set_restart_command()).  Is there any
reason why the common usage case would need to set a custom DiscardCommand?

2.  Don't expose the SM client ID at all, except as a way to provide the
old/resumed client ID using xfce_sm_client_get_full().  Really, the app
doesn't need to know it's client ID, especially since it's given a way
to save its state uniquely with _get_state_file().

2a.  Get rid of xfce_sm_client_get_full(), in favor of doing things the
"easy" way: either allowing the SM client to figure stuff out via
GOptionContext, or by passing argv/argc explicitly.  Dropping this might
be bad for language bindings that don't usually use argv/argc or
something, so maybe leave this.  I might implement support for
gnome-session's DESKTOP_AUTOSTART_ID env variable to mitigate this
potential issue.  I just dislike exposing client_id in the API.

3.  Drop support for setting a custom CloneCommand.  XfceSMClient
already sets the default CloneCommand to the same thing as the guessed
RestartCommand, but without any --sm-client-id options, which is
probably good enough for most people.  In practice, no session manager
actually even *uses* CloneCommand for anything, so an app setting it
would be somewhat useless.

4.  Drop silly things like setting the Program property.  XfceSMClient
will default that to what g_get_prgname() returns, and that should be
good enough, no?

	-brian



More information about the Xfce4-dev mailing list