Fail silently on xprop errors when determining the environment

This commit is contained in:
Christian Dywan 2009-04-27 17:46:04 +02:00
parent ba7e8846ee
commit 10426983b0

View file

@ -423,8 +423,10 @@ sokoke_get_desktop (void)
/* Are we running in Xfce? */ /* Are we running in Xfce? */
gint result; gint result;
gchar *out = NULL; gchar *out = NULL;
gchar *err = NULL;
gboolean success = g_spawn_command_line_sync ("xprop -root _DT_SAVE_MODE", gboolean success = g_spawn_command_line_sync ("xprop -root _DT_SAVE_MODE",
&out, NULL, &result, NULL); &out, &err, &result, NULL);
g_free (err);
if (success && ! result && out != NULL && strstr (out, "xfce4") != NULL) if (success && ! result && out != NULL && strstr (out, "xfce4") != NULL)
desktop = SOKOKE_DESKTOP_XFCE; desktop = SOKOKE_DESKTOP_XFCE;
else else