user32: Switch to the window DPI awareness for MDI scrolling.
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
This commit is contained in:
parent
a525631920
commit
440484fc07
|
@ -1688,11 +1688,14 @@ BOOL WINAPI TranslateMDISysAccel( HWND hwndClient, LPMSG msg )
|
|||
*/
|
||||
void WINAPI CalcChildScroll( HWND hwnd, INT scroll )
|
||||
{
|
||||
DPI_AWARENESS_CONTEXT context;
|
||||
SCROLLINFO info;
|
||||
RECT childRect, clientRect;
|
||||
HWND *list;
|
||||
DWORD style;
|
||||
|
||||
context = SetThreadDpiAwarenessContext( GetWindowDpiAwarenessContext( hwnd ));
|
||||
|
||||
GetClientRect( hwnd, &clientRect );
|
||||
SetRectEmpty( &childRect );
|
||||
|
||||
|
@ -1748,6 +1751,7 @@ void WINAPI CalcChildScroll( HWND hwnd, INT scroll )
|
|||
}
|
||||
break;
|
||||
}
|
||||
SetThreadDpiAwarenessContext( context );
|
||||
}
|
||||
|
||||
|
||||
|
@ -1757,10 +1761,12 @@ void WINAPI CalcChildScroll( HWND hwnd, INT scroll )
|
|||
void WINAPI ScrollChildren(HWND hWnd, UINT uMsg, WPARAM wParam,
|
||||
LPARAM lParam)
|
||||
{
|
||||
DPI_AWARENESS_CONTEXT context;
|
||||
INT newPos = -1;
|
||||
INT curPos, length, minPos, maxPos, shift;
|
||||
RECT rect;
|
||||
|
||||
context = SetThreadDpiAwarenessContext( GetWindowDpiAwarenessContext( hWnd ));
|
||||
GetClientRect( hWnd, &rect );
|
||||
|
||||
switch(uMsg)
|
||||
|
@ -1778,7 +1784,7 @@ void WINAPI ScrollChildren(HWND hWnd, UINT uMsg, WPARAM wParam,
|
|||
shift = GetSystemMetrics(SM_CXVSCROLL);
|
||||
break;
|
||||
default:
|
||||
return;
|
||||
goto done;
|
||||
}
|
||||
|
||||
switch( wParam )
|
||||
|
@ -1801,7 +1807,7 @@ void WINAPI ScrollChildren(HWND hWnd, UINT uMsg, WPARAM wParam,
|
|||
break;
|
||||
|
||||
case SB_THUMBTRACK:
|
||||
return;
|
||||
goto done;
|
||||
|
||||
case SB_TOP:
|
||||
newPos = minPos;
|
||||
|
@ -1811,7 +1817,7 @@ void WINAPI ScrollChildren(HWND hWnd, UINT uMsg, WPARAM wParam,
|
|||
break;
|
||||
case SB_ENDSCROLL:
|
||||
CalcChildScroll(hWnd,(uMsg == WM_VSCROLL)?SB_VERT:SB_HORZ);
|
||||
return;
|
||||
goto done;
|
||||
}
|
||||
|
||||
if( newPos > maxPos )
|
||||
|
@ -1828,6 +1834,8 @@ void WINAPI ScrollChildren(HWND hWnd, UINT uMsg, WPARAM wParam,
|
|||
else
|
||||
ScrollWindowEx(hWnd ,curPos - newPos, 0, NULL, NULL, 0, NULL,
|
||||
SW_INVALIDATE | SW_ERASE | SW_SCROLLCHILDREN );
|
||||
done:
|
||||
SetThreadDpiAwarenessContext( context );
|
||||
}
|
||||
|
||||
|
||||
|
|
Loading…
Reference in New Issue