diff --git a/Flow.Launcher/SettingWindow.xaml b/Flow.Launcher/SettingWindow.xaml index 469294ad3..46e4178b8 100644 --- a/Flow.Launcher/SettingWindow.xaml +++ b/Flow.Launcher/SettingWindow.xaml @@ -26,7 +26,7 @@ ResizeMode="CanResize" StateChanged="Window_StateChanged" Top="{Binding SettingWindowTop, Mode=TwoWay}" - WindowStartupLocation="CenterScreen" + WindowStartupLocation="Manual" mc:Ignorable="d"> diff --git a/Flow.Launcher/SettingWindow.xaml.cs b/Flow.Launcher/SettingWindow.xaml.cs index b1e18192c..fa06b14d1 100644 --- a/Flow.Launcher/SettingWindow.xaml.cs +++ b/Flow.Launcher/SettingWindow.xaml.cs @@ -12,7 +12,6 @@ using Flow.Launcher.ViewModel; using Microsoft.Win32; using ModernWpf; using System; -using System.Diagnostics; using System.IO; using System.Windows; using System.Windows.Controls; @@ -38,9 +37,10 @@ namespace Flow.Launcher public SettingWindow(IPublicAPI api, SettingWindowViewModel viewModel) { - InitializeComponent(); settings = viewModel.Settings; DataContext = viewModel; + InitializeComponent(); + InitializePosition(); this.viewModel = viewModel; API = api; } @@ -49,13 +49,13 @@ namespace Flow.Launcher private void OnLoaded(object sender, RoutedEventArgs e) { - InitializePosition(); RefreshMaximizeRestoreButton(); // Fix (workaround) for the window freezes after lock screen (Win+L) // https://stackoverflow.com/questions/4951058/software-rendering-mode-wpf HwndSource hwndSource = PresentationSource.FromVisual(this) as HwndSource; HwndTarget hwndTarget = hwndSource.CompositionTarget; hwndTarget.RenderMode = RenderMode.SoftwareOnly; + InitializePosition(); } private void OnSelectPythonDirectoryClick(object sender, RoutedEventArgs e)