-
Notifications
You must be signed in to change notification settings - Fork 6.8k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
[PT Run] WindowWalker: Refactor code, fix some bugs, hide UWP non-windows, prepare code for new features #15441
Conversation
@check-spelling-bot Report🔴 Please reviewSee the files view or the action log for details. Unrecognized words (3)Hostbackdropbrush Previously acknowledged words that are now absentChaseKnowlden CleanCodeDeveloper CTLCOLORSTATIC Deuchert efgh errc Grayscale iccex ICONINFORMATION INITCOMMONCONTROLSEX INSTALLLOGATTRIBUTES INSTALLLOGMODE INSTALLUILEVEL MAINICON MAKELPARAM msiexec MSIINSTALLER NATIVEFNTCTL netlify Qin rdeveen rexit SETRANGE SETSTEP sregex STEPIT symlink UITo We'dTo accept these unrecognized words as correct (and remove the previously acknowledged and now absent words), run the following commands... in a clone of the [email protected]:htcfreek/PowerToys.git repository
|
@check-spelling-bot Report🔴 Please reviewSee the files view or the action log for details. Unrecognized words (5)childs Previously acknowledged words that are now absentChaseKnowlden CleanCodeDeveloper CTLCOLORSTATIC Deuchert efgh errc Grayscale iccex ICONINFORMATION INITCOMMONCONTROLSEX INSTALLLOGATTRIBUTES INSTALLLOGMODE INSTALLUILEVEL MAINICON MAKELPARAM msiexec MSIINSTALLER NATIVEFNTCTL netlify Qin rdeveen rexit SETRANGE SETSTEP sregex STEPIT symlink UITo We'dTo accept these unrecognized words as correct (and remove the previously acknowledged and now absent words), run the following commands... in a clone of the [email protected]:htcfreek/PowerToys.git repository
|
@check-spelling-bot Report🔴 Please reviewSee the files view or the action log for details. Unrecognized words (7)childs Previously acknowledged words that are now absentChaseKnowlden CleanCodeDeveloper CTLCOLORSTATIC Deuchert efgh errc Grayscale iccex ICONINFORMATION INITCOMMONCONTROLSEX INSTALLLOGATTRIBUTES INSTALLLOGMODE INSTALLUILEVEL MAINICON MAKELPARAM msiexec MSIINSTALLER NATIVEFNTCTL netlify Qin rdeveen rexit SETRANGE SETSTEP sregex STEPIT symlink UITo We'dTo accept these unrecognized words as correct (and remove the previously acknowledged and now absent words), run the following commands... in a clone of the [email protected]:htcfreek/PowerToys.git repository
|
@check-spelling-bot Report🔴 Please reviewSee the files view or the action log for details. Unrecognized words (1)instantiable Previously acknowledged words that are now absentChaseKnowlden CleanCodeDeveloper CTLCOLORSTATIC Deuchert efgh errc Grayscale iccex ICONINFORMATION INITCOMMONCONTROLSEX INSTALLLOGATTRIBUTES INSTALLLOGMODE INSTALLUILEVEL MAINICON MAKELPARAM msiexec MSIINSTALLER NATIVEFNTCTL netlify Qin rdeveen rexit SETRANGE SETSTEP sregex STEPIT symlink UITo We'dTo accept these unrecognized words as correct (and remove the previously acknowledged and now absent words), run the following commands... in a clone of the [email protected]:htcfreek/PowerToys.git repository
|
src/modules/launcher/Plugins/Microsoft.Plugin.WindowWalker/Components/WindowProcess.cs
Outdated
Show resolved
Hide resolved
src/modules/launcher/Plugins/Microsoft.Plugin.WindowWalker/Components/WindowProcess.cs
Outdated
Show resolved
Hide resolved
@davidegiacometti |
Will review later |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM! Tested and working as expected.
@jaimecbernardo can someone look at this? |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM!
Great work here!
Just waiting for a second pair of eyes from @yuyoyuppe and then this can go in. |
@jaimecbernardo (I personally think we don't need this event handler and can remove it.) |
I'm OK with removing it if you think it's not needed. (pending review, of course, would need to consider the implications) |
Obsolete code is removed. PR is ready. 🚀 |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The code looks good to me!
Note: This is a follow up of the closed PR #15329 which had merge mistakes.
Summary of the Pull Request
What is this about:
This PR prepares the implementation of two new features into WindowWalker. They are asked in issue #6084:
For this new features we need some code changes and additional information about a window/app. And there are some bugs we should fix before implementing the new features.
What is included in this PR:
Code refactoring:
Window.cs
class, implementation of a newWindowProcess.cs
class and improvements to the process cache data to have less queries for static information.AppFrameHost.exe
by class instead of process id.SearchController.cs
class to speed up search times.Requirements for new features and fixes:
WindowProcess
(class): ThreadId, IsFullAccessDenied, IsUwpApp, DoesExist, IsShellProcessWindow
class: CloakedState, IsCloakedFixes:
Remarks:
How does someone test / validate:
General changes: Build local and validate information in tool tip.
Speed improvements:
System for test before improvement: Win10 Pro; 2 core [Intel i7-Intel(R) Core(TM) i7-10875H CPU @ 2.30GHz]; Ram 4,0 GB (used: ?? GB) => Times from older logs with less open windows.
System for test after improvement: Win10 Pro; 1 core [Intel i7-Intel(R) Core(TM) i7-10875H CPU @ 2.30GHz]; Ram 2,0 GB (used: 1,7 GB)
Open windows: 65 (explorer: 20, Calculator: 20, Editor: 20, Other windows: 5)
Search term: "<explorer"
QueryTimeTestLog.txt
Screenshots:
Tool tip with debug information:
![image](https://user-images.githubusercontent.com/61519853/149371116-4715e2ac-0da6-4946-bff1-253060314b34.png)
We now can check if the process of a window equals the shell process (taskbar, start menu, ...):
![image](https://user-images.githubusercontent.com/61519853/150680057-3ecb9e4e-7d5c-4918-8ab5-7049c19cac7d.png)
Properties of an hidden (preloaded) uwp app window:
![image](https://user-images.githubusercontent.com/61519853/148948617-f952307d-3b9c-4851-9155-e65b3be235d1.png)
Now hidden uwp app windows aren't shown anymore:
![image](https://user-images.githubusercontent.com/61519853/148952391-27c545f1-c830-4652-80b3-b93559beedb0.png)
Quality Checklist
Contributor License Agreement (CLA)
A CLA must be signed. If not, go over here and sign the CLA.