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 5200838 commit 78607a57693e0141cd7221c39cb019bbb6b42c3e
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
@@ -1979,8 +1979,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 78607a5

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