[PT Run] WindowWalker: Refactor code, fix some bugs, hide UWP non-windows, prepare code for new features (#15441)

* Import files from old PR #15329

* Improvements

* hide uwp non-windows (#13637)

* update debug tool tip

* fix spelling and comments

* disable tool tip

* fix doc links

* remove obsolete using

* Update docs

* fix spelling

* rename elevation property and test method

* Add property <DoesExist> to WindowProcess class

* Close process handles correctly if not used anymore

* cleanup coed

* fix bug with sticky notes process

* add window class to tool tip

* small change

* make nativeMethods static class

* fix broken uwpApp property of WindowProcess class

* rename method

* Revert making NativeMethods class static. It contains instance members.

* improve loggign

* fix merge mistakes

* fixes

* remove obsolete delegate

* Improve SearchController to speed up search (#15561)

* add <IsShellProcess> property to <WindowProcess> class

* reorder code

* disable debug tool tip

* Update devdocs

* remove obsolete event handler

* update var name
This commit is contained in:
Heiko
2022-01-25 10:33:40 +01:00
committed by GitHub
parent 5eaf60e8a2
commit edc43e39ca
8 changed files with 429 additions and 156 deletions

View File

@@ -20,11 +20,6 @@ namespace Microsoft.Plugin.WindowWalker.Components
/// </summary>
private static readonly string _powerLauncherExe = Path.GetFileName(Process.GetCurrentProcess().MainModule.FileName);
/// <summary>
/// Delegate handler for open windows updates
/// </summary>
public delegate void OpenWindowsUpdateEventHandler(object sender, SearchController.SearchResultUpdateEventArgs e);
/// <summary>
/// List of all the open windows
/// </summary>
@@ -93,9 +88,14 @@ namespace Microsoft.Plugin.WindowWalker.Components
if (newWindow.IsWindow && newWindow.Visible && newWindow.IsOwner &&
(!newWindow.IsToolWindow || newWindow.IsAppWindow) && !newWindow.TaskListDeleted &&
newWindow.ClassName != "Windows.UI.Core.CoreWindow" && newWindow.ProcessName != _powerLauncherExe)
newWindow.ClassName != "Windows.UI.Core.CoreWindow" && newWindow.ProcessInfo.Name != _powerLauncherExe)
{
windows.Add(newWindow);
// To hide (not add) preloaded uwp app windows that are invisible to the user we check the cloak state in DWM to be "none". (Issue #13637.)
// (If user asking to see these windows again we can add an optional plugin setting in the future.)
if (!newWindow.IsCloaked)
{
windows.Add(newWindow);
}
}
return true;