diff --git a/platform/windows/display_server_windows.cpp b/platform/windows/display_server_windows.cpp index 04a7d7f4b80..62e1a433e29 100644 --- a/platform/windows/display_server_windows.cpp +++ b/platform/windows/display_server_windows.cpp @@ -1832,24 +1832,6 @@ void DisplayServerWindows::window_set_size(const Size2i p_size, WindowID p_windo int w = p_size.width; int h = p_size.height; - - wd.width = w; - wd.height = h; - -#if defined(RD_ENABLED) - if (rendering_context) { - rendering_context->window_set_size(p_window, w, h); - } -#endif -#if defined(GLES3_ENABLED) - if (gl_manager_native) { - gl_manager_native->window_resize(p_window, w, h); - } - if (gl_manager_angle) { - gl_manager_angle->window_resize(p_window, w, h); - } -#endif - RECT rect; GetWindowRect(wd.hWnd, &rect); @@ -4648,6 +4630,14 @@ LRESULT DisplayServerWindows::WndProc(HWND hWnd, UINT uMsg, WPARAM wParam, LPARA // Note: Trigger resize event to update swapchains when window is minimized/restored, even if size is not changed. rendering_context->window_set_size(window_id, window.width, window.height); } +#endif +#if defined(GLES3_ENABLED) + if (gl_manager_native) { + gl_manager_native->window_resize(window_id, window.width, window.height); + } + if (gl_manager_angle) { + gl_manager_angle->window_resize(window_id, window.width, window.height); + } #endif }