mirror of
https://github.com/microsoft/PowerToys.git
synced 2025-01-19 06:53:26 +08:00
[PTRun][Window]PowerLauncher removed from results (#14786)
This commit is contained in:
parent
88ec74d81e
commit
d7e36079fc
@ -5,6 +5,8 @@
|
|||||||
// Code forked from Betsegaw Tadele's https://github.com/betsegaw/windowwalker/
|
// Code forked from Betsegaw Tadele's https://github.com/betsegaw/windowwalker/
|
||||||
using System;
|
using System;
|
||||||
using System.Collections.Generic;
|
using System.Collections.Generic;
|
||||||
|
using System.Diagnostics;
|
||||||
|
using System.IO;
|
||||||
|
|
||||||
namespace Microsoft.Plugin.WindowWalker.Components
|
namespace Microsoft.Plugin.WindowWalker.Components
|
||||||
{
|
{
|
||||||
@ -13,6 +15,11 @@ namespace Microsoft.Plugin.WindowWalker.Components
|
|||||||
/// </summary>
|
/// </summary>
|
||||||
internal class OpenWindows
|
internal class OpenWindows
|
||||||
{
|
{
|
||||||
|
/// <summary>
|
||||||
|
/// PowerLauncher main executable
|
||||||
|
/// </summary>
|
||||||
|
private static readonly string _powerLauncherExe = Path.GetFileName(Process.GetCurrentProcess().MainModule.FileName);
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// Delegate handler for open windows updates
|
/// Delegate handler for open windows updates
|
||||||
/// </summary>
|
/// </summary>
|
||||||
@ -86,7 +93,7 @@ namespace Microsoft.Plugin.WindowWalker.Components
|
|||||||
|
|
||||||
if (newWindow.IsWindow && newWindow.Visible && newWindow.IsOwner &&
|
if (newWindow.IsWindow && newWindow.Visible && newWindow.IsOwner &&
|
||||||
(!newWindow.IsToolWindow || newWindow.IsAppWindow) && !newWindow.TaskListDeleted &&
|
(!newWindow.IsToolWindow || newWindow.IsAppWindow) && !newWindow.TaskListDeleted &&
|
||||||
newWindow.ClassName != "Windows.UI.Core.CoreWindow")
|
newWindow.ClassName != "Windows.UI.Core.CoreWindow" && newWindow.ProcessName != _powerLauncherExe)
|
||||||
{
|
{
|
||||||
windows.Add(newWindow);
|
windows.Add(newWindow);
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user