Jacek Caban : win32u: Move KillSystemTimer implementation from user32.

Alexandre Julliard julliard at winehq.org
Wed Mar 16 16:48:23 CDT 2022


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

Author: Jacek Caban <jacek at codeweavers.com>
Date:   Wed Mar 16 15:36:42 2022 +0100

win32u: Move KillSystemTimer implementation from user32.

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/user32/message.c        | 12 +-----------
 dlls/win32u/message.c        | 16 ++++++++++++++++
 dlls/win32u/win32u_private.h |  1 +
 dlls/win32u/window.c         |  2 ++
 include/ntuser.h             |  1 +
 5 files changed, 21 insertions(+), 11 deletions(-)

diff --git a/dlls/user32/message.c b/dlls/user32/message.c
index 7fe9df68508..365f703c56e 100644
--- a/dlls/user32/message.c
+++ b/dlls/user32/message.c
@@ -4422,17 +4422,7 @@ UINT_PTR WINAPI SetTimer( HWND hwnd, UINT_PTR id, UINT timeout, TIMERPROC proc )
  */
 BOOL WINAPI KillSystemTimer( HWND hwnd, UINT_PTR id )
 {
-    BOOL ret;
-
-    SERVER_START_REQ( kill_win_timer )
-    {
-        req->win = wine_server_user_handle( hwnd );
-        req->msg = WM_SYSTIMER;
-        req->id  = id;
-        ret = !wine_server_call_err( req );
-    }
-    SERVER_END_REQ;
-    return ret;
+    return NtUserCallHwndParam( hwnd, id, NtUserKillSystemTimer );
 }
 
 
diff --git a/dlls/win32u/message.c b/dlls/win32u/message.c
index d70984dbe2b..d00178e6aa4 100644
--- a/dlls/win32u/message.c
+++ b/dlls/win32u/message.c
@@ -210,6 +210,22 @@ BOOL WINAPI NtUserKillTimer( HWND hwnd, UINT_PTR id )
     return ret;
 }
 
+/* see KillSystemTimer */
+BOOL kill_system_timer( HWND hwnd, UINT_PTR id )
+{
+    BOOL ret;
+
+    SERVER_START_REQ( kill_win_timer )
+    {
+        req->win = wine_server_user_handle( hwnd );
+        req->msg = WM_SYSTIMER;
+        req->id  = id;
+        ret = !wine_server_call_err( req );
+    }
+    SERVER_END_REQ;
+    return ret;
+}
+
 /* see SendMessageW */
 LRESULT send_message( HWND hwnd, UINT msg, WPARAM wparam, LPARAM lparam )
 {
diff --git a/dlls/win32u/win32u_private.h b/dlls/win32u/win32u_private.h
index c943089c462..0c4e3b82f0f 100644
--- a/dlls/win32u/win32u_private.h
+++ b/dlls/win32u/win32u_private.h
@@ -313,6 +313,7 @@ extern BOOL set_capture_window( HWND hwnd, UINT gui_flags, HWND *prev_ret ) DECL
 extern BOOL set_foreground_window( HWND hwnd, BOOL mouse ) DECLSPEC_HIDDEN;
 
 /* message.c */
+extern BOOL kill_system_timer( HWND hwnd, UINT_PTR id ) DECLSPEC_HIDDEN;
 extern LRESULT post_message( HWND hwnd, UINT msg, WPARAM wparam, LPARAM lparam ) DECLSPEC_HIDDEN;
 extern LRESULT send_message( HWND hwnd, UINT msg, WPARAM wparam, LPARAM lparam ) DECLSPEC_HIDDEN;
 
diff --git a/dlls/win32u/window.c b/dlls/win32u/window.c
index 2700df862ca..079b4b0695f 100644
--- a/dlls/win32u/window.c
+++ b/dlls/win32u/window.c
@@ -3332,6 +3332,8 @@ ULONG_PTR WINAPI NtUserCallHwndParam( HWND hwnd, DWORD_PTR param, DWORD code )
         return get_window_word( hwnd, param );
     case NtUserIsChild:
         return is_child( hwnd, UlongToHandle(param) );
+    case NtUserKillSystemTimer:
+        return kill_system_timer( hwnd, param );
     case NtUserMonitorFromWindow:
         return HandleToUlong( monitor_from_window( hwnd, param, NtUserMonitorFromWindow ));
     case NtUserSetCaptureWindow:
diff --git a/include/ntuser.h b/include/ntuser.h
index 3352a63e1ea..5e79083aa01 100644
--- a/include/ntuser.h
+++ b/include/ntuser.h
@@ -178,6 +178,7 @@ enum
     NtUserGetWindowThread,
     NtUserGetWindowWord,
     NtUserIsChild,
+    NtUserKillSystemTimer,
     NtUserMonitorFromWindow,
     NtUserSetCaptureWindow,
     NtUserSetForegroundWindow,




More information about the wine-cvs mailing list