Jacek Caban : win32u: Use NtUserCallHwndParam for MirrorRgn implementation.

Alexandre Julliard julliard at winehq.org
Wed Apr 13 15:14:45 CDT 2022


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

Author: Jacek Caban <jacek at codeweavers.com>
Date:   Wed Apr 13 15:06:51 2022 +0200

win32u: Use NtUserCallHwndParam for MirrorRgn implementation.

Signed-off-by: Jacek Caban <jacek at codeweavers.com>
Signed-off-by: Huw Davies <huw at codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard at winehq.org>

---

 dlls/gdi32/objects.c    | 2 +-
 dlls/win32u/sysparams.c | 2 --
 dlls/win32u/window.c    | 2 ++
 include/ntuser.h        | 2 +-
 4 files changed, 4 insertions(+), 4 deletions(-)

diff --git a/dlls/gdi32/objects.c b/dlls/gdi32/objects.c
index 0260027a484..88b36f279a3 100644
--- a/dlls/gdi32/objects.c
+++ b/dlls/gdi32/objects.c
@@ -695,7 +695,7 @@ HRGN WINAPI CreatePolygonRgn( const POINT *points, INT count, INT mode )
  */
 BOOL WINAPI MirrorRgn( HWND hwnd, HRGN hrgn )
 {
-    return NtUserCallTwoParam( HandleToUlong(hwnd), HandleToUlong(hrgn), NtUserMirrorRgn );
+    return NtUserCallHwndParam( hwnd, HandleToUlong(hrgn), NtUserMirrorRgn );
 }
 
 /***********************************************************************
diff --git a/dlls/win32u/sysparams.c b/dlls/win32u/sysparams.c
index 77a6a70e27f..36461d81fde 100644
--- a/dlls/win32u/sysparams.c
+++ b/dlls/win32u/sysparams.c
@@ -4752,8 +4752,6 @@ ULONG_PTR WINAPI NtUserCallTwoParam( ULONG_PTR arg1, ULONG_PTR arg2, ULONG code
         return get_monitor_info( UlongToHandle(arg1), (MONITORINFO *)arg2 );
     case NtUserGetSystemMetricsForDpi:
         return get_system_metrics_for_dpi( arg1, arg2 );
-    case NtUserMirrorRgn:
-        return mirror_window_region( UlongToHandle(arg1), UlongToHandle(arg2) );
     case NtUserMonitorFromRect:
         return HandleToUlong( monitor_from_rect( (const RECT *)arg1, arg2, get_thread_dpi() ));
     case NtUserReplyMessage:
diff --git a/dlls/win32u/window.c b/dlls/win32u/window.c
index f6fd52b9029..b2913b267c4 100644
--- a/dlls/win32u/window.c
+++ b/dlls/win32u/window.c
@@ -5048,6 +5048,8 @@ ULONG_PTR WINAPI NtUserCallHwndParam( HWND hwnd, DWORD_PTR param, DWORD code )
         return is_child( hwnd, UlongToHandle(param) );
     case NtUserKillSystemTimer:
         return kill_system_timer( hwnd, param );
+    case NtUserMirrorRgn:
+        return mirror_window_region( hwnd, UlongToHandle(param) );
     case NtUserMonitorFromWindow:
         return HandleToUlong( monitor_from_window( hwnd, param, NtUserMonitorFromWindow ));
     case NtUserScreenToClient:
diff --git a/include/ntuser.h b/include/ntuser.h
index 5190bec5560..e33855261ce 100644
--- a/include/ntuser.h
+++ b/include/ntuser.h
@@ -166,7 +166,6 @@ enum
 {
     NtUserGetMonitorInfo,
     NtUserGetSystemMetricsForDpi,
-    NtUserMirrorRgn,
     NtUserMonitorFromRect,
     NtUserReplyMessage,
     NtUserSetIconParam,
@@ -213,6 +212,7 @@ enum
     NtUserGetWindowWord,
     NtUserIsChild,
     NtUserKillSystemTimer,
+    NtUserMirrorRgn,
     NtUserMonitorFromWindow,
     NtUserScreenToClient,
     NtUserSetCaptureWindow,




More information about the wine-cvs mailing list