mirror of
https://github.com/microsoft/PowerToys.git
synced 2026-04-05 18:57:19 +02:00
[PTRun][WindowWalker] Fixes and small improvements (#16959)
* fixes and changes * fix spelling * add os version check * Improve speed of virtual desktop helper * speed improvement two
This commit is contained in:
@@ -5,7 +5,6 @@
|
||||
// Code forked from Betsegaw Tadele's https://github.com/betsegaw/windowwalker/
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Diagnostics;
|
||||
using System.IO;
|
||||
using Wox.Plugin.Common.Win32;
|
||||
|
||||
@@ -89,7 +88,7 @@ namespace Microsoft.Plugin.WindowWalker.Components
|
||||
|
||||
if (newWindow.IsWindow && newWindow.Visible && newWindow.IsOwner &&
|
||||
(!newWindow.IsToolWindow || newWindow.IsAppWindow) && !newWindow.TaskListDeleted &&
|
||||
(newWindow.Desktop.IsVisible || !WindowWalkerSettings.Instance.ResultsFromVisibleDesktopOnly) &&
|
||||
(newWindow.Desktop.IsVisible || !WindowWalkerSettings.Instance.ResultsFromVisibleDesktopOnly || Main.VirtualDesktopHelperInstance.GetDesktopCount() < 2) &&
|
||||
newWindow.ClassName != "Windows.UI.Core.CoreWindow" && newWindow.Process.Name != _powerLauncherExe)
|
||||
{
|
||||
// To hide (not add) preloaded uwp app windows that are invisible to the user and other cloaked windows, we check the cloak state. (Issue #13637.)
|
||||
|
||||
@@ -126,7 +126,8 @@ namespace Microsoft.Plugin.WindowWalker.Components
|
||||
$"Is ShellProcess: {window.Process.IsShellProcess}\n" +
|
||||
$"Is window cloaked: {window.IsCloaked}\n" +
|
||||
$"Window cloak state: {window.GetWindowCloakState()}\n" +
|
||||
$"Desktop name: {window.Desktop.Name}" +
|
||||
$"Desktop id: {window.Desktop.Id}\n" +
|
||||
$"Desktop name: {window.Desktop.Name}\n" +
|
||||
$"Desktop number: {window.Desktop.Number}\n" +
|
||||
$"Desktop is visible: {window.Desktop.IsVisible}\n" +
|
||||
$"Desktop position: {window.Desktop.Position}\n" +
|
||||
|
||||
@@ -307,7 +307,7 @@ namespace Microsoft.Plugin.WindowWalker.Components
|
||||
case (int)DwmWindowCloakStates.CloakedApp:
|
||||
return WindowCloakState.App;
|
||||
case (int)DwmWindowCloakStates.CloakedShell:
|
||||
return Main.VirtualDesktopHelperInstance.IsWindowCloakedByVirtualDesktopManager(hwnd) ? WindowCloakState.OtherDesktop : WindowCloakState.Shell;
|
||||
return Main.VirtualDesktopHelperInstance.IsWindowCloakedByVirtualDesktopManager(hwnd, Desktop.Id) ? WindowCloakState.OtherDesktop : WindowCloakState.Shell;
|
||||
case (int)DwmWindowCloakStates.CloakedInherited:
|
||||
return WindowCloakState.Inherited;
|
||||
default:
|
||||
|
||||
@@ -4,7 +4,6 @@
|
||||
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Reflection;
|
||||
using System.Windows.Controls;
|
||||
using ManagedCommon;
|
||||
using Microsoft.Plugin.WindowWalker.Components;
|
||||
@@ -24,8 +23,6 @@ namespace Microsoft.Plugin.WindowWalker
|
||||
|
||||
public string Name => Properties.Resources.wox_plugin_windowwalker_plugin_name;
|
||||
|
||||
private readonly string _assemblyName = Assembly.GetExecutingAssembly().GetName().Name;
|
||||
|
||||
public string Description => Properties.Resources.wox_plugin_windowwalker_plugin_description;
|
||||
|
||||
internal static readonly VirtualDesktopHelper VirtualDesktopHelperInstance = new VirtualDesktopHelper();
|
||||
|
||||
@@ -250,7 +250,7 @@ namespace Microsoft.Plugin.WindowWalker.Properties {
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Looks up a localized string similar to Show desktop name in subtitle (If two or more desktops exist).
|
||||
/// Looks up a localized string similar to Show desktop name in the subtitle (If two or more desktops exist).
|
||||
/// </summary>
|
||||
public static string wox_plugin_windowwalker_SettingSubtitleDesktopName {
|
||||
get {
|
||||
@@ -259,7 +259,7 @@ namespace Microsoft.Plugin.WindowWalker.Properties {
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Looks up a localized string similar to Show process id in subtitle.
|
||||
/// Looks up a localized string similar to Show process id in the subtitle.
|
||||
/// </summary>
|
||||
public static string wox_plugin_windowwalker_SettingSubtitlePid {
|
||||
get {
|
||||
|
||||
@@ -140,10 +140,10 @@
|
||||
<value>Show only results from visible desktop</value>
|
||||
</data>
|
||||
<data name="wox_plugin_windowwalker_SettingSubtitleDesktopName" xml:space="preserve">
|
||||
<value>Show desktop name in subtitle (If two or more desktops exist)</value>
|
||||
<value>Show desktop name in the subtitle (If two or more desktops exist)</value>
|
||||
</data>
|
||||
<data name="wox_plugin_windowwalker_SettingSubtitlePid" xml:space="preserve">
|
||||
<value>Show process id in subtitle</value>
|
||||
<value>Show process id in the subtitle</value>
|
||||
</data>
|
||||
<data name="wox_plugin_windowwalker_SettingOpenAfterKillAndClose" xml:space="preserve">
|
||||
<value>Stay open after closing windows and killing processes (Not working with kill process confirmation)</value>
|
||||
|
||||
Reference in New Issue
Block a user