mirror of
https://github.com/microsoft/PowerToys.git
synced 2026-04-05 18:57:19 +02:00
[FancyZones] Remove "keep windows pinned to virtual desktop location" settings (#3093)
* Remove keep windows pinned to virtual desktop location FancyZones settings * Remove virtual desktop switch handling for this scenario.
This commit is contained in:
@@ -16,7 +16,6 @@ namespace Microsoft.PowerToys.Settings.UI.Lib
|
||||
this.FancyzonesMoveWindowsAcrossMonitors = new BoolProperty();
|
||||
this.FancyzonesDisplayChangeMoveWindows = new BoolProperty();
|
||||
this.FancyzonesZoneSetChangeMoveWindows = new BoolProperty();
|
||||
this.FancyzonesVirtualDesktopChangeMoveWindows = new BoolProperty();
|
||||
this.FancyzonesAppLastZoneMoveWindows = new BoolProperty();
|
||||
this.UseCursorposEditorStartupscreen = new BoolProperty(ConfigDefaults.DefaultUseCursorposEditorStartupscreen);
|
||||
this.FancyzonesShowOnAllMonitors = new BoolProperty();
|
||||
@@ -56,9 +55,6 @@ namespace Microsoft.PowerToys.Settings.UI.Lib
|
||||
[JsonPropertyName("fancyzones_zoneSetChange_moveWindows")]
|
||||
public BoolProperty FancyzonesZoneSetChangeMoveWindows { get; set; }
|
||||
|
||||
[JsonPropertyName("fancyzones_virtualDesktopChange_moveWindows")]
|
||||
public BoolProperty FancyzonesVirtualDesktopChangeMoveWindows { get; set; }
|
||||
|
||||
[JsonPropertyName("fancyzones_appLastZone_moveWindows")]
|
||||
public BoolProperty FancyzonesAppLastZoneMoveWindows { get; set; }
|
||||
|
||||
|
||||
@@ -281,9 +281,6 @@
|
||||
<data name="FancyZones_HokeyEditorControl_Header.Header" xml:space="preserve">
|
||||
<value>Edit hot key / shortcut</value>
|
||||
</data>
|
||||
<data name="FancyZones_KeepWindowsPinned.Content" xml:space="preserve">
|
||||
<value>Keep windows pinned to multiple desktops in the same zone when the active desktop changes</value>
|
||||
</data>
|
||||
<data name="FancyZones_LaunchEditorButtonControl_Header.Content" xml:space="preserve">
|
||||
<value>Launch Zones Editor</value>
|
||||
</data>
|
||||
@@ -311,9 +308,6 @@
|
||||
<data name="FancyZones_UseCursorPosEditorStartupScreen.Content" xml:space="preserve">
|
||||
<value>Follow mouse cursor instead of focus when launching editor in a multi screen environment</value>
|
||||
</data>
|
||||
<data name="FancyZones_VirtualDesktopChangeMoveWindows.Content" xml:space="preserve">
|
||||
<value>Move newly created windows to their last known zone</value>
|
||||
</data>
|
||||
<data name="FancyZones_ZoneBehavior_GroupSettings.Text" xml:space="preserve">
|
||||
<value>Zone behavior</value>
|
||||
</data>
|
||||
|
||||
@@ -43,7 +43,6 @@ namespace Microsoft.PowerToys.Settings.UI.ViewModels
|
||||
this._moveWindowsAcrossMonitors = Settings.Properties.FancyzonesMoveWindowsAcrossMonitors.Value;
|
||||
this._displayChangemoveWindows = Settings.Properties.FancyzonesDisplayChangeMoveWindows.Value;
|
||||
this._zoneSetChangeMoveWindows = Settings.Properties.FancyzonesZoneSetChangeMoveWindows.Value;
|
||||
this._virtualDesktopChangeMoveWindows = Settings.Properties.FancyzonesVirtualDesktopChangeMoveWindows.Value;
|
||||
this._appLastZoneMoveWindows = Settings.Properties.FancyzonesAppLastZoneMoveWindows.Value;
|
||||
this._useCursorPosEditorStartupScreen = Settings.Properties.UseCursorposEditorStartupscreen.Value;
|
||||
this._showOnAllMonitors = Settings.Properties.FancyzonesShowOnAllMonitors.Value;
|
||||
@@ -82,7 +81,6 @@ namespace Microsoft.PowerToys.Settings.UI.ViewModels
|
||||
private bool _moveWindowsAcrossMonitors;
|
||||
private bool _displayChangemoveWindows;
|
||||
private bool _zoneSetChangeMoveWindows;
|
||||
private bool _virtualDesktopChangeMoveWindows;
|
||||
private bool _appLastZoneMoveWindows;
|
||||
private bool _useCursorPosEditorStartupScreen;
|
||||
private bool _showOnAllMonitors;
|
||||
@@ -225,24 +223,6 @@ namespace Microsoft.PowerToys.Settings.UI.ViewModels
|
||||
}
|
||||
}
|
||||
|
||||
public bool VirtualDesktopChangeMoveWindows
|
||||
{
|
||||
get
|
||||
{
|
||||
return _virtualDesktopChangeMoveWindows;
|
||||
}
|
||||
|
||||
set
|
||||
{
|
||||
if (value != _virtualDesktopChangeMoveWindows)
|
||||
{
|
||||
_virtualDesktopChangeMoveWindows = value;
|
||||
Settings.Properties.FancyzonesVirtualDesktopChangeMoveWindows.Value = value;
|
||||
RaisePropertyChanged();
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
public bool AppLastZoneMoveWindows
|
||||
{
|
||||
get
|
||||
|
||||
@@ -108,16 +108,6 @@
|
||||
Margin="{StaticResource SmallTopMargin}"
|
||||
IsEnabled="{ Binding Mode=TwoWay, Path=IsEnabled}"/>
|
||||
|
||||
<CheckBox x:Uid="FancyZones_KeepWindowsPinned"
|
||||
IsChecked="{ Binding Mode=TwoWay, Path=VirtualDesktopChangeMoveWindows}"
|
||||
Margin="{StaticResource SmallTopMargin}"
|
||||
IsEnabled="{ Binding Mode=TwoWay, Path=IsEnabled}"/>
|
||||
|
||||
<CheckBox x:Uid="FancyZones_VirtualDesktopChangeMoveWindows"
|
||||
IsChecked="{ Binding Mode=TwoWay, Path=AppLastZoneMoveWindows}"
|
||||
Margin="{StaticResource SmallTopMargin}"
|
||||
IsEnabled="{ Binding Mode=TwoWay, Path=IsEnabled}"/>
|
||||
|
||||
<CheckBox x:Uid="FancyZones_UseCursorPosEditorStartupScreen"
|
||||
IsChecked="{ Binding Mode=TwoWay, Path=UseCursorPosEditorStartupScreen}"
|
||||
Margin="{StaticResource SmallTopMargin}"
|
||||
|
||||
@@ -176,24 +176,6 @@ namespace ViewModelTests
|
||||
viewModel.ZoneSetChangeMoveWindows = true;
|
||||
}
|
||||
|
||||
[TestMethod]
|
||||
public void VirtualDesktopChangeMoveWindows_ShouldSetValue2True_WhenSuccessful()
|
||||
{
|
||||
// arrange
|
||||
FancyZonesViewModel viewModel = new FancyZonesViewModel();
|
||||
Assert.IsFalse(viewModel.VirtualDesktopChangeMoveWindows); // check if value was initialized to false.
|
||||
|
||||
// Assert
|
||||
ShellPage.DefaultSndMSGCallback = msg =>
|
||||
{
|
||||
FancyZonesSettingsIPCMessage snd = JsonSerializer.Deserialize<FancyZonesSettingsIPCMessage>(msg);
|
||||
Assert.IsTrue(snd.Powertoys.FancyZones.Properties.FancyzonesVirtualDesktopChangeMoveWindows.Value);
|
||||
};
|
||||
|
||||
// act
|
||||
viewModel.VirtualDesktopChangeMoveWindows = true;
|
||||
}
|
||||
|
||||
[TestMethod]
|
||||
public void AppLastZoneMoveWindows_ShouldSetValue2True_WhenSuccessful()
|
||||
{
|
||||
|
||||
Reference in New Issue
Block a user