mirror of
git://source.winehq.org/git/wine.git
synced 2024-09-30 04:48:36 +00:00
winex11: Force thread DPI awareness when calling NtUserChildWindowFromPointEx.
This commit is contained in:
parent
949920810a
commit
0bc571657e
|
@ -1423,8 +1423,7 @@ static HWND find_drop_window( HWND hQueryWnd, LPPOINT lpPt )
|
|||
|
||||
if (PtInRect( &tempRect, pt))
|
||||
{
|
||||
HWND ret = NtUserChildWindowFromPointEx( hQueryWnd, pt.x, pt.y,
|
||||
CWP_SKIPINVISIBLE|CWP_SKIPDISABLED );
|
||||
HWND ret = child_window_from_point( hQueryWnd, pt.x, pt.y, CWP_SKIPINVISIBLE | CWP_SKIPDISABLED );
|
||||
if (ret && ret != hQueryWnd)
|
||||
{
|
||||
ret = find_drop_window( ret, lpPt );
|
||||
|
|
|
@ -903,6 +903,15 @@ static inline BOOL redraw_window( HWND hwnd, const RECT *rect, HRGN hrgn, UINT f
|
|||
return ret;
|
||||
}
|
||||
|
||||
/* per-monitor DPI aware NtUserChildWindowFromPointEx call */
|
||||
static inline HWND child_window_from_point( HWND parent, LONG x, LONG y, UINT flags )
|
||||
{
|
||||
UINT context = NtUserSetThreadDpiAwarenessContext( NTUSER_DPI_PER_MONITOR_AWARE_V2 );
|
||||
HWND ret = NtUserChildWindowFromPointEx( parent, x, y, flags );
|
||||
NtUserSetThreadDpiAwarenessContext( context );
|
||||
return ret;
|
||||
}
|
||||
|
||||
static inline HWND get_focus(void)
|
||||
{
|
||||
GUITHREADINFO info;
|
||||
|
|
Loading…
Reference in a new issue