mirror of
https://github.com/fastfetch-cli/fastfetch.git
synced 2026-10-29 16:26:39 +01:00
DisplayServer (Linux): don't rely on $XDG_SESSION_TYPE for detecting wm protocol
Fix #1162
This commit is contained in:
@@ -46,9 +46,7 @@ static void getWMProtocolNameFromEnv(FFDisplayServerResult* result)
|
||||
|
||||
void ffConnectDisplayServerImpl(FFDisplayServerResult* ds)
|
||||
{
|
||||
getWMProtocolNameFromEnv(ds);
|
||||
|
||||
if (!ffStrbufEqualS(&ds->wmProtocolName, FF_WM_PROTOCOL_TTY) &&instance.config.general.dsForceDrm == FF_DS_FORCE_DRM_TYPE_FALSE)
|
||||
if (instance.config.general.dsForceDrm == FF_DS_FORCE_DRM_TYPE_FALSE)
|
||||
{
|
||||
//We try wayland as our preferred display server, as it supports the most features.
|
||||
//This method can't detect the name of our WM / DE
|
||||
@@ -96,6 +94,9 @@ void ffConnectDisplayServerImpl(FFDisplayServerResult* ds)
|
||||
}
|
||||
#endif
|
||||
|
||||
if (ds->wmProtocolName.length == 0)
|
||||
getWMProtocolNameFromEnv(ds);
|
||||
|
||||
if(!ffStrbufEqualS(&ds->wmProtocolName, FF_WM_PROTOCOL_TTY))
|
||||
{
|
||||
//This fills in missing information about WM / DE by using env vars and iterating processes
|
||||
|
||||
Reference in New Issue
Block a user