mirror of https://github.com/mpv-player/mpv
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
This commit is contained in:
parent
8bce6d0b89
commit
5676e5ba39
|
@ -1115,6 +1115,11 @@ static LRESULT CALLBACK WndProc(HWND hWnd, UINT message, WPARAM wParam,
|
||||||
break;
|
break;
|
||||||
case WM_DPICHANGED:
|
case WM_DPICHANGED:
|
||||||
update_display_info(w32);
|
update_display_info(w32);
|
||||||
|
|
||||||
|
RECT *rc = (RECT*)lParam;
|
||||||
|
w32->windowrc = *rc;
|
||||||
|
subtract_window_borders(w32, w32->window, &w32->windowrc);
|
||||||
|
update_window_state(w32);
|
||||||
break;
|
break;
|
||||||
case WM_CLOSE:
|
case WM_CLOSE:
|
||||||
// Don't destroy the window yet to not lose wakeup events.
|
// Don't destroy the window yet to not lose wakeup events.
|
||||||
|
|
Loading…
Reference in New Issue