Uses FancyZones logic to test if window is zonable or not. Displays
window styles and results for various tests if the window should be
zonable or not.
* Introduce handling of new/old work areas (defined by virtual desktop id and monitor)
* Save data to JSON storage only once after we register all deleted virtual desktops
* Update saving mechanism
* Remove resolution from unique identifier
* Update comments related to new unique identifier
* Don't handle NULL GUID as it is default one
* Revert "Remove resolution from unique identifier"
This reverts commit 5a36651217.
* Revert "Update comments related to new unique identifier"
This reverts commit 8e89802549.
* removed MigrateDeviceInfoFromRegistry
Co-authored-by: Seraphima Zykova <zykovas91@gmail.com>
* Added PowerLauncher spec and images
* Fixed images path
* Addressed review comments
* Fixed images
* Addressed review comments, and added link to keyboard shortcut manager PowerToy
* Added Ueli in comparison table
* Added keyboard input element
* Added suggestions from community
* Moved default shell and terminal settings
* Addressed feedback
* Added community suggestion
* Modified spec based on feedback
* Modified spec based on suggestions
* Added keyboard shortcuts to context menu options
* Migrate FancyZones data persisting from Registry to JSON file
* Address PR comment: Remove redundant check
* Addres PR comment: Remove unused Dpi and add CmdArgs enum
* Address PR comment: Make methods const and inline
* Address PR comments: Expose GenerateUniqueId function and use const ref instead of passing wstring by value
* Address PR comment: Use lamdba as callback
* Address PR comment: Move GenerateUniqueId to ZoneWindowUtils namespace
* Address PR comment: Use regular comparison instead of std::wstring::compare
* Address PR comment: Use std::wstring_view for tmp file paths
* Address PR comment: Use scoped lock when accessing member data
* Address PR comment: Remove typedefs to increase code readability
* Address PR comment: removed nullptr checks with corresponding tests
* Address PR comment: Move ZoneSet object instead of copying
* Address PR comment: Make FancyZonesData instance const where possible
* Remove unnecessary gutter variable during calculating zone coordinates
* Remove uneeded subclass
* Avoid unnecessary copying and reserve space for vector if possible
* Save FancyZones data after exiting editor
* App zone history (#18)
* added window and zone set ids to app zone history
* Rename JSON file
* Remove AppZoneHistory migration
* Move parsing of ZoneWindow independent temp files outside of it
* Unit tests update (#19)
* check device existence in map
* updated ZoneSet tests
* updated JsonHelpers tests
* Use single zone count information
* Remove uneeded tests
* Remove one more test
* Remove uneeded line
* Address PR comments - Missing whitespace
* Update zoneset data for new virtual desktops (#21)
* update active zone set with actual data
* Introduce Blank zone set (used to indicate that no layout applied yet). Move parsing completely outside of ZoneWindow.
* Fix unit tests to match modifications in implementation
* Fix applying layouts on startup (second monitor)
Co-authored-by: vldmr11080 <57061786+vldmr11080@users.noreply.github.com>
Co-authored-by: Seraphima <zykovas91@gmail.com>
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.
The cache was introduced to improve performance by not querying the
OS for the window process path every time we need to check if the window
is interesting to FancyZones. Since then other changes were made to the
the way we check the windows. Right now, the IsInterestingWindow function is
called when:
1) WinKey + arrows are used
2) window is started to be dragged
3) window is created
1) and 2) are initiated by the user, happen only once per interaction so
their performance impact can be dismissed. The 3) happens all the time
but for the most part the check for WS_CHILD or
GetAncestor(window, GA_ROOT) == window will filter those out. In the
end, only top-level windows will be queried for their path.
Removing the cache improves code readability and will make code
maintenance easier.
Do not swallow WinKey+Arrow events for non-interesting windows. This makes apps that are in the "excluded apps" list behave as if "Override windows snap keys" is disabled - they will react to the Windows default snap.