Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Project manager window position bug fix: #37323 #37366

Closed
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 4 additions & 1 deletion platform/windows/display_server_windows.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -2858,7 +2858,10 @@ DisplayServerWindows::DisplayServerWindows(const String &p_rendering_driver, Win
}
}
#endif
WindowID main_window = _create_window(p_mode, 0, Rect2i(Point2i(), p_resolution));
Point2i window_position(
(GetSystemMetrics(SM_CXSCREEN) - p_resolution.x) / 2,
(GetSystemMetrics(SM_CYSCREEN) - p_resolution.y) / 2);
WindowID main_window = _create_window(p_mode, 0, Rect2i(window_position, p_resolution));
for (int i = 0; i < WINDOW_FLAG_MAX; i++) {
if (p_flags & (1 << i)) {
window_set_flag(WindowFlags(i), true, main_window);
Expand Down