user32: Switch to the window DPI awareness to process WM_GETMINMAXINFO.

Signed-off-by: Alexandre Julliard <julliard@winehq.org>
This commit is contained in:
Alexandre Julliard 2018-08-24 12:28:56 +02:00
parent 0da23418ab
commit 72644bb603
1 changed files with 4 additions and 0 deletions

View File

@ -748,6 +748,7 @@ static void WINPOS_ShowIconTitle( HWND hwnd, BOOL bShow )
*/
MINMAXINFO WINPOS_GetMinMaxInfo( HWND hwnd )
{
DPI_AWARENESS_CONTEXT context;
MINMAXINFO MinMax;
HMONITOR monitor;
INT xinc, yinc;
@ -757,6 +758,8 @@ MINMAXINFO WINPOS_GetMinMaxInfo( HWND hwnd )
RECT rc;
WND *win;
context = SetThreadDpiAwarenessContext( GetWindowDpiAwarenessContext( hwnd ));
/* Compute default values */
GetWindowRect(hwnd, &rc);
@ -842,6 +845,7 @@ MINMAXINFO WINPOS_GetMinMaxInfo( HWND hwnd )
MinMax.ptMaxTrackSize.y = max( MinMax.ptMaxTrackSize.y,
MinMax.ptMinTrackSize.y );
SetThreadDpiAwarenessContext( context );
return MinMax;
}