diff --git a/Flow.Launcher/MainWindow.xaml.cs b/Flow.Launcher/MainWindow.xaml.cs index b4f1fb031..8ca153afc 100644 --- a/Flow.Launcher/MainWindow.xaml.cs +++ b/Flow.Launcher/MainWindow.xaml.cs @@ -78,21 +78,19 @@ namespace Flow.Launcher InitializeComponent(); } - private const int WM_ENTERSIZEMOVE = 0x0231; - private const int WM_EXITSIZEMOVE = 0x0232; private int _initialWidth; private int _initialHeight; private IntPtr WndProc(IntPtr hwnd, int msg, IntPtr wParam, IntPtr lParam, ref bool handled) { - if (msg == WM_ENTERSIZEMOVE) + if (msg == PInvoke.WM_ENTERSIZEMOVE) { _initialWidth = (int)Width; _initialHeight = (int)Height; handled = true; } - if (msg == WM_EXITSIZEMOVE) + if (msg == PInvoke.WM_EXITSIZEMOVE) { if (_initialHeight != (int)Height) { diff --git a/Flow.Launcher/NativeMethods.txt b/Flow.Launcher/NativeMethods.txt index bbf55502e..2b147c05f 100644 --- a/Flow.Launcher/NativeMethods.txt +++ b/Flow.Launcher/NativeMethods.txt @@ -11,4 +11,7 @@ GetShellWindow GetWindowRect GetClassName FindWindowEx -WINDOW_STYLE \ No newline at end of file +WINDOW_STYLE + +WM_ENTERSIZEMOVE +WM_EXITSIZEMOVE \ No newline at end of file