mirror of
https://github.com/microsoft/PowerToys.git
synced 2026-04-06 11:16:51 +02:00
[FancyZones] Open window on active monitor (#4361)
* Initial design for opening window on active monitor * Perform entire handling in DPI unaware thread * Codestyle improvement * Improve resizing mechanism and optimise code a bit * Remove unneeded code, make simple helper functions inline * Make this feature configurable * Code optimization, improve positioning for some applications * Retry positioning for certain applications * Improve readability * Address PR comments: Minor code style improvements * Remove retries in custom positioning * Position new toggle in settings menu
This commit is contained in:
@@ -44,6 +44,7 @@ namespace Microsoft.PowerToys.Settings.UI.ViewModels
|
||||
this._displayChangemoveWindows = Settings.Properties.FancyzonesDisplayChangeMoveWindows.Value;
|
||||
this._zoneSetChangeMoveWindows = Settings.Properties.FancyzonesZoneSetChangeMoveWindows.Value;
|
||||
this._appLastZoneMoveWindows = Settings.Properties.FancyzonesAppLastZoneMoveWindows.Value;
|
||||
this._openWindowOnActiveMonitor = Settings.Properties.FancyzonesOpenWindowOnActiveMonitor.Value;
|
||||
this._restoreSize = Settings.Properties.FancyzonesRestoreSize.Value;
|
||||
this._useCursorPosEditorStartupScreen = Settings.Properties.UseCursorposEditorStartupscreen.Value;
|
||||
this._showOnAllMonitors = Settings.Properties.FancyzonesShowOnAllMonitors.Value;
|
||||
@@ -83,6 +84,7 @@ namespace Microsoft.PowerToys.Settings.UI.ViewModels
|
||||
private bool _displayChangemoveWindows;
|
||||
private bool _zoneSetChangeMoveWindows;
|
||||
private bool _appLastZoneMoveWindows;
|
||||
private bool _openWindowOnActiveMonitor;
|
||||
private bool _restoreSize;
|
||||
private bool _useCursorPosEditorStartupScreen;
|
||||
private bool _showOnAllMonitors;
|
||||
@@ -243,6 +245,24 @@ namespace Microsoft.PowerToys.Settings.UI.ViewModels
|
||||
}
|
||||
}
|
||||
|
||||
public bool OpenWindowOnActiveMonitor
|
||||
{
|
||||
get
|
||||
{
|
||||
return _openWindowOnActiveMonitor;
|
||||
}
|
||||
|
||||
set
|
||||
{
|
||||
if (value != _openWindowOnActiveMonitor)
|
||||
{
|
||||
_openWindowOnActiveMonitor = value;
|
||||
Settings.Properties.FancyzonesOpenWindowOnActiveMonitor.Value = value;
|
||||
RaisePropertyChanged();
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
public bool RestoreSize
|
||||
{
|
||||
get
|
||||
|
||||
Reference in New Issue
Block a user