mirror of
https://github.com/fastfetch-cli/fastfetch.git
synced 2026-10-29 16:26:39 +01:00
DisplayServer (Windows): reduce system dependencies
This commit is contained in:
@@ -2,10 +2,12 @@
|
||||
#include "common/windows/unicode.h"
|
||||
#include "common/edidHelper.h"
|
||||
|
||||
#include <dwmapi.h>
|
||||
#include <winuser.h>
|
||||
#include <windows.h>
|
||||
#include <wchar.h>
|
||||
|
||||
// http://undoc.airesoft.co.uk/user32.dll/IsThreadDesktopComposited.php
|
||||
BOOL WINAPI IsThreadDesktopComposited();
|
||||
|
||||
typedef struct FFMonitorInfo
|
||||
{
|
||||
HMONITOR handle;
|
||||
@@ -253,8 +255,7 @@ static void detectDisplays(FFDisplayServerResult* ds)
|
||||
|
||||
void ffConnectDisplayServerImpl(FFDisplayServerResult* ds)
|
||||
{
|
||||
BOOL enabled;
|
||||
if(SUCCEEDED(DwmIsCompositionEnabled(&enabled)) && enabled)
|
||||
if (IsThreadDesktopComposited())
|
||||
{
|
||||
ffStrbufSetStatic(&ds->wmProcessName, "dwm.exe");
|
||||
ffStrbufSetStatic(&ds->wmPrettyName, "Desktop Window Manager");
|
||||
|
||||
Reference in New Issue
Block a user