From 222f066b69cf5ca0df03b06e03599c845f9e3dcb Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Beno=C3=AEt=20Minisini?= Date: Sun, 27 Sep 2015 21:58:32 +0000 Subject: [PATCH] [GB.GTK] * BUG: Fix detection of XFCE desktop. [GB.GTK3] * BUG: Fix detection of XFCE desktop. [GB.QT4] * BUG: Fix detection of XFCE desktop. [GB.QT5] * BUG: Fix detection of XFCE desktop. git-svn-id: svn://localhost/gambas/trunk@7361 867c0c6c-44f3-4631-809d-bfa615b0a4ec --- gb.qt4/src/desktop.c | 10 +++++++++- 1 file changed, 9 insertions(+), 1 deletion(-) diff --git a/gb.qt4/src/desktop.c b/gb.qt4/src/desktop.c index d9f86d6f0..0ead988e8 100644 --- a/gb.qt4/src/desktop.c +++ b/gb.qt4/src/desktop.c @@ -44,7 +44,7 @@ static const char *calc_desktop_type() char *env; env = getenv("KDE_FULL_SESSION"); - if (env && strcmp(env, "true") == 0) + if (env && strcasecmp(env, "true") == 0) { env = getenv("KDE_SESSION_VERSION"); if (env) @@ -77,6 +77,14 @@ static const char *calc_desktop_type() if (env && *env) return "WINDOWMAKER"; + env = getenv("DESKTOP_SESSION"); + if (env && strcasecmp(env, "XFCE") == 0) + return "XFCE"; + + env = getenv("XDG_MENU_PREFIX"); + if (env && strncasecmp(env, "XFCE", 4) == 0) + return "XFCE"; + env = getenv("XDG_CURRENT_DESKTOP"); if (env && *env && strlen(env) < sizeof(_desktop)) return env;