Fix regression in some context menus on Windows due to recent changes to windows showing after first paint

This commit is contained in:
Wojtek Figat
2023-10-04 17:34:14 +02:00
parent fe9b6d73a8
commit f1d57e47cb
2 changed files with 7 additions and 1 deletions

View File

@@ -220,6 +220,12 @@ void WindowsWindow::Show()
if (!_settings.HasBorder)
{
SetWindowPos(_handle, nullptr, 0, 0, 0, 0, SWP_FRAMECHANGED | SWP_NOMOVE | SWP_NOSIZE | SWP_NOACTIVATE | SWP_NOZORDER);
if (!_settings.IsRegularWindow && _settings.ShowAfterFirstPaint && _settings.StartPosition == WindowStartPosition::Manual)
{
int32 x = Math::TruncToInt(_settings.Position.X);
int32 y = Math::TruncToInt(_settings.Position.Y);
SetWindowPos(_handle, nullptr, x, y, 0, 0, SWP_NOZORDER | SWP_NOSIZE | SWP_NOACTIVATE | SWP_NOOWNERZORDER);
}
}
#endif