Always assume TTY when both $XDG_SESSION_TYPE and $WAYLAND_DISPLAY are not set

$TERM can be set to value other than `linux` ( eg xterm, xterm-256color ), just assume TTY when no desktop env is found, which effectively bypasses `getWMDE`
Fix #83
This commit is contained in:
李通洲
2021-10-17 18:11:50 +08:00
parent f265307dc4
commit 8d7d33882f
+2 -5
View File
@@ -297,11 +297,8 @@ static void getSessionTypeFromEnv(FFWMDEResult* result)
env = getenv("TERM");
if(env != NULL && *env != '\0')
{
if(strcasecmp(env, "linux") == 0)
{
ffStrbufSetS(&result->wmProtocolName, "TTY");
return;
}
ffStrbufSetS(&result->wmProtocolName, "TTY");
return;
}
}