user32/tests: Also ignore WM_SYSTIMER messages in input tests.

Signed-off-by: Alexandre Julliard <julliard@winehq.org>
This commit is contained in:
Alexandre Julliard 2015-12-02 22:14:39 +09:00
parent 80193a6c68
commit c92ba78899
1 changed files with 8 additions and 2 deletions

View File

@ -39,6 +39,10 @@
#define SPI_GETDESKWALLPAPER 0x0073 #define SPI_GETDESKWALLPAPER 0x0073
#endif #endif
#ifndef WM_SYSTIMER
#define WM_SYSTIMER 0x0118
#endif
#define LONG_PTR INT_PTR #define LONG_PTR INT_PTR
#define ULONG_PTR UINT_PTR #define ULONG_PTR UINT_PTR
@ -183,6 +187,8 @@ static BOOL ignore_message( UINT message )
return (message >= 0xc000 || return (message >= 0xc000 ||
message == WM_GETICON || message == WM_GETICON ||
message == WM_GETOBJECT || message == WM_GETOBJECT ||
message == WM_TIMER ||
message == WM_SYSTIMER ||
message == WM_TIMECHANGE || message == WM_TIMECHANGE ||
message == WM_DEVICECHANGE); message == WM_DEVICECHANGE);
} }
@ -3435,7 +3441,7 @@ static BOOL peek_message( MSG *msg )
do do
{ {
ret = PeekMessageA(msg, 0, 0, 0, PM_REMOVE); ret = PeekMessageA(msg, 0, 0, 0, PM_REMOVE);
} while (ret && (msg->message == WM_TIMER || ignore_message(msg->message))); } while (ret && ignore_message(msg->message));
return ret; return ret;
} }
@ -3599,7 +3605,7 @@ static void test_mouse_input(HWND hwnd)
/* FIXME: SetCursorPos in Wine generates additional WM_MOUSEMOVE message */ /* FIXME: SetCursorPos in Wine generates additional WM_MOUSEMOVE message */
while (PeekMessageA(&msg, 0, 0, 0, PM_REMOVE)) while (PeekMessageA(&msg, 0, 0, 0, PM_REMOVE))
{ {
if (msg.message == WM_TIMER || ignore_message(msg.message)) continue; if (ignore_message(msg.message)) continue;
ok(msg.hwnd == popup && msg.message == WM_MOUSEMOVE, ok(msg.hwnd == popup && msg.message == WM_MOUSEMOVE,
"hwnd %p message %04x\n", msg.hwnd, msg.message); "hwnd %p message %04x\n", msg.hwnd, msg.message);
DispatchMessageA(&msg); DispatchMessageA(&msg);