mirror of
https://github.com/microsoft/PowerToys.git
synced 2026-04-07 11:46:30 +02:00
[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:
@@ -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;
|
||||
|
||||
Reference in New Issue
Block a user