Skip to content

Commit

Permalink
fix some apps from showing, name desktop
Browse files Browse the repository at this point in the history
  • Loading branch information
shalzuth committed Apr 2, 2021
1 parent 0b0118f commit 4076ee3
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions WindowSharingHider/WindowHandler.cs
Original file line number Diff line number Diff line change
Expand Up @@ -45,12 +45,14 @@ public static Dictionary<IntPtr, String> 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;
Expand Down

0 comments on commit 4076ee3

Please sign in to comment.