[PTRun][WindowWalker]Don't hang when closing an unresponsive window (#33167)

* add(windowWalkerComponents): added a "Responding" variable signifying if a process is responding or not

* add(win32NativeMethod): added "SendMessageTimeout" method in the common Win32 namespace

* refactor(windowWalkerWindow): added an implementation of the helper function for closing the window using the newly defined method

refactor(windowWalkerWindow): added a thread to run, whenever "CloseThisWindow" is called

* refactor(resultHelper): used localizable strings for printing the responding text

add(resources): added "Not Responding" localizable text to the resources file

* refactor(resultHelper): refactored the message in case of a "Not Responding" task

* refactor(resultHelper): modified the formatting of the subtitle

* refactor(window): refactored the helper function and removed the unnecessary variable

* refactor(windowProcess): changed the variable name from "Responding" to "IsResponding"

* add: added try-catch to isResponding getter
This commit is contained in:
Vaibhav Sharma
2024-06-09 02:48:13 +05:30
committed by GitHub
parent 126a03e3b0
commit e3f5fba870
6 changed files with 57 additions and 2 deletions

View File

@@ -141,6 +141,15 @@ namespace Microsoft.Plugin.WindowWalker.Properties {
}
}
/// <summary>
/// Looks up a localized string similar to Not Responding.
/// </summary>
public static string wox_plugin_windowwalker_NotResponding {
get {
return ResourceManager.GetString("wox_plugin_windowwalker_NotResponding", resourceCulture);
}
}
/// <summary>
/// Looks up a localized string similar to No..
/// </summary>

View File

@@ -202,4 +202,7 @@
<data name="wox_plugin_windowwalker_SettingSubtitleDesktopName_Description" xml:space="preserve">
<value>This information is only shown in subtitle and tool tip, if you have at least two desktops.</value>
</data>
<data name="wox_plugin_windowwalker_NotResponding" xml:space="preserve">
<value>Not Responding</value>
</data>
</root>