From 5676e5ba3998b5059d358ede05ee54c059ed49db Mon Sep 17 00:00:00 2001 From: Piotr Gasior Date: Thu, 7 May 2020 21:13:51 +0200 Subject: w32_common: Scale window when moving to display with different DPI For applications that are DPI aware WM_DPICHANGED message contains suggested size and position of window --- video/out/w32_common.c | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/video/out/w32_common.c b/video/out/w32_common.c index 6f927d7f28..f9778549c6 100644 --- a/video/out/w32_common.c +++ b/video/out/w32_common.c @@ -1115,6 +1115,11 @@ static LRESULT CALLBACK WndProc(HWND hWnd, UINT message, WPARAM wParam, break; case WM_DPICHANGED: update_display_info(w32); + + RECT *rc = (RECT*)lParam; + w32->windowrc = *rc; + subtract_window_borders(w32, w32->window, &w32->windowrc); + update_window_state(w32); break; case WM_CLOSE: // Don't destroy the window yet to not lose wakeup events. -- cgit v1.2.3