Jacek Caban : win32u: Move NtUserKillTimer implementation from user32.
Alexandre Julliard
julliard at winehq.org
Wed Mar 16 16:48:23 CDT 2022
Module: wine
Branch: master
Commit: e520e29ca4a0d03125e82a8654596a4b212d1ab4
URL: https://source.winehq.org/git/wine.git/?a=commit;h=e520e29ca4a0d03125e82a8654596a4b212d1ab4
Author: Jacek Caban <jacek at codeweavers.com>
Date: Wed Mar 16 15:36:30 2022 +0100
win32u: Move NtUserKillTimer 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/edit.c | 2 +-
dlls/user32/message.c | 19 -------------------
dlls/user32/user32.spec | 2 +-
dlls/win32u/message.c | 18 ++++++++++++++++++
dlls/win32u/syscall.c | 1 +
dlls/win32u/win32u.spec | 2 +-
dlls/wow64win/syscall.h | 1 +
dlls/wow64win/user.c | 8 ++++++++
include/ntuser.h | 1 +
9 files changed, 32 insertions(+), 22 deletions(-)
diff --git a/dlls/user32/edit.c b/dlls/user32/edit.c
index 9bbfa2727b2..28d93b98b83 100644
--- a/dlls/user32/edit.c
+++ b/dlls/user32/edit.c
@@ -3633,7 +3633,7 @@ static LRESULT EDIT_WM_LButtonDown(EDITSTATE *es, DWORD keys, INT x, INT y)
static LRESULT EDIT_WM_LButtonUp(EDITSTATE *es)
{
if (es->bCaptureState) {
- KillTimer(es->hwndSelf, 0);
+ NtUserKillTimer(es->hwndSelf, 0);
if (GetCapture() == es->hwndSelf) ReleaseCapture();
}
es->bCaptureState = FALSE;
diff --git a/dlls/user32/message.c b/dlls/user32/message.c
index eee4759513a..7fe9df68508 100644
--- a/dlls/user32/message.c
+++ b/dlls/user32/message.c
@@ -4417,25 +4417,6 @@ UINT_PTR WINAPI SetTimer( HWND hwnd, UINT_PTR id, UINT timeout, TIMERPROC proc )
}
-/***********************************************************************
- * KillTimer (USER32.@)
- */
-BOOL WINAPI KillTimer( HWND hwnd, UINT_PTR id )
-{
- BOOL ret;
-
- SERVER_START_REQ( kill_win_timer )
- {
- req->win = wine_server_user_handle( hwnd );
- req->msg = WM_TIMER;
- req->id = id;
- ret = !wine_server_call_err( req );
- }
- SERVER_END_REQ;
- return ret;
-}
-
-
/***********************************************************************
* KillSystemTimer (USER32.@)
*/
diff --git a/dlls/user32/user32.spec b/dlls/user32/user32.spec
index c5ea5e6c4c0..7c27d9400db 100644
--- a/dlls/user32/user32.spec
+++ b/dlls/user32/user32.spec
@@ -484,7 +484,7 @@
@ stdcall IsWindowVisible(long)
@ stdcall IsZoomed(long)
@ stdcall KillSystemTimer(long long)
-@ stdcall KillTimer(long long)
+@ stdcall KillTimer(long long) NtUserKillTimer
@ stdcall LoadAcceleratorsA(long str)
@ stdcall LoadAcceleratorsW(long wstr)
@ stdcall LoadBitmapA(long str)
diff --git a/dlls/win32u/message.c b/dlls/win32u/message.c
index 5fb238566f3..d70984dbe2b 100644
--- a/dlls/win32u/message.c
+++ b/dlls/win32u/message.c
@@ -192,6 +192,24 @@ UINT_PTR WINAPI NtUserSetSystemTimer( HWND hwnd, UINT_PTR id, UINT timeout, TIME
return ret;
}
+/***********************************************************************
+ * NtUserKillTimer (win32u.@)
+ */
+BOOL WINAPI NtUserKillTimer( HWND hwnd, UINT_PTR id )
+{
+ BOOL ret;
+
+ SERVER_START_REQ( kill_win_timer )
+ {
+ req->win = wine_server_user_handle( hwnd );
+ req->msg = WM_TIMER;
+ 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/syscall.c b/dlls/win32u/syscall.c
index 5dbf6f43ac6..2be2cfce3bf 100644
--- a/dlls/win32u/syscall.c
+++ b/dlls/win32u/syscall.c
@@ -142,6 +142,7 @@ static void * const syscalls[] =
NtUserGetWindowRgnEx,
NtUserInitializeClientPfnArrays,
NtUserInternalGetWindowText,
+ NtUserKillTimer,
NtUserNotifyWinEvent,
NtUserOpenDesktop,
NtUserOpenInputDesktop,
diff --git a/dlls/win32u/win32u.spec b/dlls/win32u/win32u.spec
index 9c6103b84f8..96d8d4833b0 100644
--- a/dlls/win32u/win32u.spec
+++ b/dlls/win32u/win32u.spec
@@ -1059,7 +1059,7 @@
@ stub NtUserIsTouchWindow
@ stub NtUserIsWindowBroadcastingDpiToChildren
@ stub NtUserIsWindowGDIScaledDpiMessageEnabled
-@ stub NtUserKillTimer
+@ stdcall -syscall NtUserKillTimer(long long)
@ stub NtUserLayoutCompleted
@ stub NtUserLinkDpiCursor
@ stub NtUserLoadKeyboardLayoutEx
diff --git a/dlls/wow64win/syscall.h b/dlls/wow64win/syscall.h
index 4b181ecba89..7b6bbb5eda6 100644
--- a/dlls/wow64win/syscall.h
+++ b/dlls/wow64win/syscall.h
@@ -127,6 +127,7 @@
SYSCALL_ENTRY( NtUserGetWindowRgnEx ) \
SYSCALL_ENTRY( NtUserInitializeClientPfnArrays ) \
SYSCALL_ENTRY( NtUserInternalGetWindowText ) \
+ SYSCALL_ENTRY( NtUserKillTimer ) \
SYSCALL_ENTRY( NtUserNotifyWinEvent ) \
SYSCALL_ENTRY( NtUserOpenDesktop ) \
SYSCALL_ENTRY( NtUserOpenInputDesktop ) \
diff --git a/dlls/wow64win/user.c b/dlls/wow64win/user.c
index 2af7f9a3115..1a43b4793fb 100644
--- a/dlls/wow64win/user.c
+++ b/dlls/wow64win/user.c
@@ -554,6 +554,14 @@ NTSTATUS WINAPI wow64_NtUserSetTimer( UINT *args )
return NtUserSetTimer( hwnd, id, timeout, proc, tolerance );
}
+NTSTATUS WINAPI wow64_NtUserKillTimer( UINT *args )
+{
+ HWND hwnd = get_handle( &args );
+ UINT_PTR id = get_ulong( &args );
+
+ return NtUserKillTimer( hwnd, id );
+}
+
NTSTATUS WINAPI wow64_NtUserCopyAcceleratorTable( UINT *args )
{
HACCEL src = get_handle( &args );
diff --git a/include/ntuser.h b/include/ntuser.h
index afa4d0d561f..3352a63e1ea 100644
--- a/include/ntuser.h
+++ b/include/ntuser.h
@@ -365,6 +365,7 @@ NTSTATUS WINAPI NtUserInitializeClientPfnArrays( const struct user_client_procs
const void *client_workers, HINSTANCE user_module );
INT WINAPI NtUserInternalGetWindowText( HWND hwnd, WCHAR *text, INT count );
BOOL WINAPI NtUserIsClipboardFormatAvailable( UINT format );
+BOOL WINAPI NtUserKillTimer( HWND hwnd, UINT_PTR id );
UINT WINAPI NtUserMapVirtualKeyEx( UINT code, UINT type, HKL layout );
BOOL WINAPI NtUserMessageCall( HWND hwnd, UINT msg, WPARAM wparam, LPARAM lparam,
ULONG_PTR result_info, DWORD type, BOOL ansi );
More information about the wine-cvs
mailing list