mirror of
https://github.com/microsoft/PowerToys.git
synced 2024-12-13 19:19:23 +08:00
0fdc1d0a1f
Splits the code use to filter windows for FancyZones and the "active window" for the ShortcutGuide. The FancyZones logic is preserved and merged into a single function. We keep it in common.h, as it might be also used in other PowerToys, like maximized to new desktop. We do however change the return type to be more descriptive. It also returns a separate flag for if the window has a visible owner. This can be used to implement the approved apps list. For the ShortcutGuide, the logic is relaxed to include more windows. One example are Explorer properties windows. Those are (and should) filtered by the FancyZones, but should appear in the window preview in the SCG. The new return type also includes information if the window will react to the default Windows Snap. This is not ideal though. Currently, SCG can only disable the entire "Windows Controls" group. OTOH windows like "Save As..." dialogs can be snapped to corners etc., but cannot be minimized nor maximized. Until SCG can separately disable those buttons we will display the buttons in the enabled state only if the window supports all settings. In the future, we should integrate FancyZones snap override here too. |
||
---|---|---|
.. | ||
codeAnalysis | ||
common | ||
modules | ||
runner | ||
settings | ||
settings-web | ||
README.md |
PowerToys Source Code
Code organization
The PowerToys are split into DLLs for each PowerToy module (modules
folder), and an executable (runner
folder) that loads and manages those DLLs.
The settings window is a separate executable, contained in settings
folder. It utilizes a WebView to display an HTML-based settings window (contained in settings-web
folder).
The common
contains code for a static libary with helper functions, used by both the runner and the PowerToys modules.