Skip to content
Permalink
Browse files

Fix case-insensitive comparison in running_in_mate

The environment variable XDG_SESSION_DESKTOP and DESKTOP_SESSION in
running_in_mate are compared using "MATE". Actually the environment
variable in MATE DE is "mate"(lower case). Using "mate" instead of
"MATE" to fix it.

Signed-off-by: Zhang Xianwei <zhang.xianwei8@zte.com.cn>
  • Loading branch information...
zhangxianwei8 authored and raveit65 committed Oct 29, 2018
1 parent 0bffad7 commit 2676eaf3ed92ef33e2a39aece779465c427a59db
Showing with 6 additions and 6 deletions.
  1. +2 −2 libegg/eggsmclient.c
  2. +2 −2 src/caja-application.c
  3. +2 −2 src/caja-main.c
@@ -57,8 +57,8 @@ static gboolean
running_in_mate (void)
{
return (g_strcmp0 (g_getenv ("XDG_CURRENT_DESKTOP"), "MATE") == 0)
|| (g_strcmp0 (g_getenv ("XDG_SESSION_DESKTOP"), "MATE") == 0)
|| (g_strcmp0 (g_getenv ("DESKTOP_SESSION"), "MATE") == 0);
|| (g_strcmp0 (g_getenv ("XDG_SESSION_DESKTOP"), "mate") == 0)
|| (g_strcmp0 (g_getenv ("DESKTOP_SESSION"), "mate") == 0);
}

static void
@@ -2041,8 +2041,8 @@ static gboolean
running_in_mate (void)
{
return (g_strcmp0 (g_getenv ("XDG_CURRENT_DESKTOP"), "MATE") == 0)
|| (g_strcmp0 (g_getenv ("XDG_SESSION_DESKTOP"), "MATE") == 0)
|| (g_strcmp0 (g_getenv ("DESKTOP_SESSION"), "MATE") == 0);
|| (g_strcmp0 (g_getenv ("XDG_SESSION_DESKTOP"), "mate") == 0)
|| (g_strcmp0 (g_getenv ("DESKTOP_SESSION"), "mate") == 0);
}

static gboolean
@@ -220,8 +220,8 @@ static gboolean
running_in_mate (void)
{
return (g_strcmp0 (g_getenv ("XDG_CURRENT_DESKTOP"), "MATE") == 0)
|| (g_strcmp0 (g_getenv ("XDG_SESSION_DESKTOP"), "MATE") == 0)
|| (g_strcmp0 (g_getenv ("DESKTOP_SESSION"), "MATE") == 0);
|| (g_strcmp0 (g_getenv ("XDG_SESSION_DESKTOP"), "mate") == 0)
|| (g_strcmp0 (g_getenv ("DESKTOP_SESSION"), "mate") == 0);
}

static gboolean

0 comments on commit 2676eaf

Please sign in to comment.
You can’t perform that action at this time.