Skip to content

Commit 1f5a662

Browse files
committed
fix: bug that TabWindowView show in wrong screen if it was closed with WindowState.Maximized
1 parent 3153745 commit 1f5a662

File tree

1 file changed

+5
-4
lines changed

1 file changed

+5
-4
lines changed

Ui/View/Host/TabWindowView.xaml.cs

Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -35,10 +35,6 @@ public TabWindowView()
3535
this.MinWidth = this.MinHeight = 300;
3636
this.WindowStartupLocation = WindowStartupLocation.CenterScreen;
3737
this.WindowStyle = WindowStyle.SingleBorderWindow;
38-
if (IoC.Get<LocalityService>().TabWindowState != System.Windows.WindowState.Minimized)
39-
{
40-
this.WindowState = IoC.Get<LocalityService>().TabWindowState;
41-
}
4238

4339
Focusable = true;
4440
this.Loaded += (_, _) =>
@@ -121,6 +117,11 @@ public TabWindowView()
121117
{
122118
this.StopFlashingWindow();
123119
};
120+
121+
if (IoC.Get<LocalityService>().TabWindowState != System.Windows.WindowState.Minimized)
122+
{
123+
this.WindowState = IoC.Get<LocalityService>().TabWindowState;
124+
}
124125
};
125126
}
126127

0 commit comments

Comments
 (0)