* 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.
Make the runner not run as elevated by default. Add a setting for
"run PowerToys as elevated" and buttons to restart the process
with the different elevation levels.
* docs: split usage and dev docs
* # This is a combination of 2 commits.
# This is the 1st commit message:
docs: split usage and dev docs
# The commit message #2 will be skipped:
# fixup add docs
* docs: add runner documentation and move hooks documentation to devdocs
* docs: add stubs for modules technical description
* docs: add paragraph about event thread-safety
* docs: add 'Current modules' section header
1) Adding example project to Debug / Release Builds.
2) Including <string> in common.h
3) Using std::optional instead of PowerToysValues::is_[type]_value
4) Fixing warnings generated by unreferenced 'ex' variable in exception handling.
5) Updated relative path of version.h in exeample_powertoy.rc
This makes the Hotkey settings object ignore the key value stored in
json. Instead it will be deduced from the current keyboard layout and
the vk_code.
Unifies the way windows are considered "interesting" by FancyZone.
Berfore the change WinKey + arrows would use different method than
dragging. This PR makes both use the WinKey + arrows method.
Cleans up FancyZones Settings.cpp by removing m_configStrings variable.
Contrary to its name it was used to create color picker control.
Adds a multiline option to the text input to settings. Uses this to
provide the user with a way to exclude certain apps from snapping to
zones.
* Use DPIAware::DEFAULT_DPI
* Make runner DPI-unaware, since it doesn't need to use a Per Monitor V2 DPI.
* Programmatically enable "Per Monitor V2 DPI" for the runner proccess and use a separate DPI-unaware thread for the corresponding API calls
* Increase PCH memory limit for settings project
* Address review issues
* Draw zoneWindows properly scaled
* Don't trace event on exit
change 'PowertoyModuleDeleter' to not call 'module->disable();' before 'module->destroy();' so the module can distinguish between being turned off and PowerToys exiting.
Code formatting.
* uppercase for event name
* Trace on/off event for ShortcutGuide module
* Trace the 'hide' event only if the guide was visible
'on_hide()' is invoked when the module is turned off, in that case don't trace the hide event.
* Remove spaces in data field names
Remove 'ShowGuide' event since it's not providing any useful data.
* Include build number in version number