summaryrefslogtreecommitdiff
path: root/openbox
diff options
context:
space:
mode:
authorDana Jansens <danakj@orodu.net>2009-12-10 15:00:56 -0500
committerDana Jansens <danakj@orodu.net>2009-12-10 15:00:56 -0500
commit5c01dc651a220ad1ccce9502da577d81f1877388 (patch)
tree5ffe8ac8ab6ef7dae5b699528aa3af64f7334285 /openbox
parent7e6ef2683f68d0b8cf75d4ebb6a778cd87288d7f (diff)
Get the session client id from new gnome-session
See http://live.gnome.org/SessionManagement/GnomeSession#A1._Launch Gnome-session sets the DESKTOP_AUTOSTART_ID env variable with the SM client id instead of passing it on the command line.
Diffstat (limited to 'openbox')
-rw-r--r--openbox/openbox.c13
1 files changed, 13 insertions, 0 deletions
diff --git a/openbox/openbox.c b/openbox/openbox.c
index 4a49c802..60e147c3 100644
--- a/openbox/openbox.c
+++ b/openbox/openbox.c
@@ -561,8 +561,21 @@ static void remove_args(gint *argc, gchar **argv, gint index, gint num)
static void parse_env()
{
+ const gchar *id;
+
/* unset this so we don't pass it on unknowingly */
unsetenv("DESKTOP_STARTUP_ID");
+
+ /* this is how gnome-session passes in a session client id */
+ id = g_getenv("DESKTOP_AUTOSTART_ID");
+ if (id) {
+ unsetenv("DESKTOP_AUTOSTART_ID");
+ if (ob_sm_id) g_free(ob_sm_id);
+ ob_sm_id = g_strdup(id);
+ ob_debug_type(OB_DEBUG_SM,
+ "DESKTOP_AUTOSTART_ID %s supercedes --sm-client-id\n",
+ ob_sm_id);
+ }
}
static void parse_args(gint *argc, gchar **argv)