Alexandre Julliard : user32: Map mouse events to physical coordinates in SendInput.

Alexandre Julliard julliard at winehq.org
Mon Aug 27 16:18:15 CDT 2018


Module: wine
Branch: master
Commit: c33615dcf313179eba03e196407dd0eacb6ff455
URL:    https://source.winehq.org/git/wine.git/?a=commit;h=c33615dcf313179eba03e196407dd0eacb6ff455

Author: Alexandre Julliard <julliard at winehq.org>
Date:   Mon Aug 27 14:18:24 2018 +0200

user32: Map mouse events to physical coordinates in SendInput.

Signed-off-by: Alexandre Julliard <julliard at winehq.org>

---

 dlls/user32/input.c | 2 ++
 1 file changed, 2 insertions(+)

diff --git a/dlls/user32/input.c b/dlls/user32/input.c
index 72a68dd..8b2ae80 100644
--- a/dlls/user32/input.c
+++ b/dlls/user32/input.c
@@ -141,6 +141,7 @@ static void update_mouse_coords( INPUT *input )
 
     if (input->u.mi.dwFlags & MOUSEEVENTF_ABSOLUTE)
     {
+        DPI_AWARENESS_CONTEXT context = SetThreadDpiAwarenessContext( DPI_AWARENESS_CONTEXT_PER_MONITOR_AWARE );
         if (input->u.mi.dwFlags & MOUSEEVENTF_VIRTUALDESK)
         {
             RECT rc = get_virtual_screen_rect();
@@ -152,6 +153,7 @@ static void update_mouse_coords( INPUT *input )
             input->u.mi.dx = (input->u.mi.dx * GetSystemMetrics( SM_CXSCREEN )) >> 16;
             input->u.mi.dy = (input->u.mi.dy * GetSystemMetrics( SM_CYSCREEN )) >> 16;
         }
+        SetThreadDpiAwarenessContext( context );
     }
     else
     {




More information about the wine-cvs mailing list