Skip to content

Commit

Permalink
Fix case-insensitive comparison in running_in_mate
Browse files Browse the repository at this point in the history
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 Nov 8, 2018
1 parent 5200838 commit 78607a5
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 6 deletions.
4 changes: 2 additions & 2 deletions libegg/eggsmclient.c
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
4 changes: 2 additions & 2 deletions src/caja-application.c
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
4 changes: 2 additions & 2 deletions src/caja-main.c
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down

0 comments on commit 78607a5

Please sign in to comment.