Win arrows revisited (#5932)

* Added the setting

* Refactored existing code, the main feature isn't implemented yet

* Renamed a method

* Updated a comment in IZoneWindow

* Added the zone selection algorithm, didn't test it

* Basic features work

* Single monitor cycling works

* Seems that the feature works well

* Polished the settings page

* Rebase fix

* Fixed a null pointer dereference

* Use classic if syntax

* Fixed bad indentation

How did these lines unindent themselves?

* Removed TODO comment

* Rebase fix

* Another rebase fix
This commit is contained in:
Ivan Stošić
2020-08-21 12:53:03 +02:00
committed by GitHub
parent 64c51a49a0
commit 976116a012
24 changed files with 657 additions and 173 deletions

View File

@@ -36,6 +36,7 @@
#define MoveWindowsOnZoneSetChangeKey "MoveWindowsOnZoneSetChange"
#define OverrideSnapHotKeysKey "OverrideSnapHotKeys"
#define MoveWindowAcrossMonitorsKey "MoveWindowAcrossMonitors"
#define MoveWindowsBasedOnPositionKey "MoveWindowsBasedOnPosition"
#define MoveWindowsToLastZoneOnAppOpeningKey "MoveWindowsToLastZoneOnAppOpening"
#define OpenWindowOnActiveMonitorKey "OpenWindowOnActiveMonitor"
#define RestoreSizeKey "RestoreSize"
@@ -215,13 +216,13 @@ void Trace::FancyZones::EditorLaunched(int value) noexcept
void Trace::SettingsChanged(const Settings& settings) noexcept
{
const auto& editorHotkey = settings.editorHotkey;
std::wstring hotkeyStr = L"alt:" + std::to_wstring(editorHotkey.alt_pressed())
+ L", ctrl:" + std::to_wstring(editorHotkey.ctrl_pressed())
+ L", shift:" + std::to_wstring(editorHotkey.shift_pressed())
+ L", win:" + std::to_wstring(editorHotkey.win_pressed())
+ L", code:" + std::to_wstring(editorHotkey.get_code())
std::wstring hotkeyStr = L"alt:" + std::to_wstring(editorHotkey.alt_pressed())
+ L", ctrl:" + std::to_wstring(editorHotkey.ctrl_pressed())
+ L", shift:" + std::to_wstring(editorHotkey.shift_pressed())
+ L", win:" + std::to_wstring(editorHotkey.win_pressed())
+ L", code:" + std::to_wstring(editorHotkey.get_code())
+ L", keyFromCode:" + editorHotkey.get_key();
TraceLoggingWrite(
g_hProvider,
EventSettingsChangedKey,
@@ -234,6 +235,7 @@ void Trace::SettingsChanged(const Settings& settings) noexcept
TraceLoggingBoolean(settings.zoneSetChange_moveWindows, MoveWindowsOnZoneSetChangeKey),
TraceLoggingBoolean(settings.overrideSnapHotkeys, OverrideSnapHotKeysKey),
TraceLoggingBoolean(settings.moveWindowAcrossMonitors, MoveWindowAcrossMonitorsKey),
TraceLoggingBoolean(settings.moveWindowsBasedOnPosition, MoveWindowsBasedOnPositionKey),
TraceLoggingBoolean(settings.appLastZone_moveWindows, MoveWindowsToLastZoneOnAppOpeningKey),
TraceLoggingBoolean(settings.openWindowOnActiveMonitor, OpenWindowOnActiveMonitorKey),
TraceLoggingBoolean(settings.restoreSize, RestoreSizeKey),