summaryrefslogtreecommitdiff
path: root/cut-n-paste-code/libegg/eggsmclient.c
diff options
context:
space:
mode:
Diffstat (limited to 'cut-n-paste-code/libegg/eggsmclient.c')
-rw-r--r--cut-n-paste-code/libegg/eggsmclient.c5
1 files changed, 1 insertions, 4 deletions
diff --git a/cut-n-paste-code/libegg/eggsmclient.c b/cut-n-paste-code/libegg/eggsmclient.c
index 153d98e8..7dc0f8a8 100644
--- a/cut-n-paste-code/libegg/eggsmclient.c
+++ b/cut-n-paste-code/libegg/eggsmclient.c
@@ -53,7 +53,6 @@ G_DEFINE_TYPE (EggSMClient, egg_sm_client, G_TYPE_OBJECT)
static EggSMClient *global_client;
static EggSMClientMode global_client_mode = EGG_SM_CLIENT_MODE_NORMAL;
-#if ENABLE_LIBUNIQUE == (0)
static gboolean
running_in_mate (void)
{
@@ -61,7 +60,6 @@ running_in_mate (void)
|| (g_strcmp0 (g_getenv ("XDG_SESSION_DESKTOP"), "MATE") == 0)
|| (g_strcmp0 (g_getenv ("DESKTOP_SESSION"), "MATE") == 0);
}
-#endif
static void
egg_sm_client_init (EggSMClient *client)
@@ -366,11 +364,10 @@ egg_sm_client_get (void)
/*as egg_sm_client_set_mode must be called prior to start of main loop
/*to stop caja restart but this is diffcult in GtkApplication
*/
-#if ENABLE_LIBUNIQUE == (0)
+
if (geteuid () == 0 || !running_in_mate ()){
global_client = g_object_new (EGG_TYPE_SM_CLIENT, NULL);
}
-#endif
}
return global_client;