From 4076ee3d4c6bd4b6e0065f5d2ba22229ca144759 Mon Sep 17 00:00:00 2001 From: shalzuth Date: Fri, 2 Apr 2021 16:15:51 -0700 Subject: [PATCH] fix some apps from showing, name desktop --- WindowSharingHider/WindowHandler.cs | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/WindowSharingHider/WindowHandler.cs b/WindowSharingHider/WindowHandler.cs index a7d6525..6eee939 100644 --- a/WindowSharingHider/WindowHandler.cs +++ b/WindowSharingHider/WindowHandler.cs @@ -45,12 +45,14 @@ public static Dictionary GetVisibleWindows() { if (!IsWindowVisible(hWnd)) return true; DwmGetWindowAttribute(hWnd, 14, out Int32 pvAttribute, 4); - if (pvAttribute == 2) return true; + if (pvAttribute > 0) return true; var length = GetWindowTextLength(hWnd); if (length == 0) return true; var windowTextBuilder = new StringBuilder(length + 1); GetWindowText(hWnd, windowTextBuilder, windowTextBuilder.Capacity); - windows[hWnd] = windowTextBuilder.ToString(); + var windowTitle = windowTextBuilder.ToString(); + if (windowTitle == "Program Manager") windowTitle = "Desktop and Icons"; + windows[hWnd] = windowTitle; return true; }, IntPtr.Zero); return windows;