Fixes bug 45284.
Signed-off-by: Fabian Maurer dark.shadow4@web.de --- dlls/user32/misc.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/dlls/user32/misc.c b/dlls/user32/misc.c index be4b71a4bc..c3f4030a90 100644 --- a/dlls/user32/misc.c +++ b/dlls/user32/misc.c @@ -843,7 +843,7 @@ LONG WINAPI GetDisplayConfigBufferSizes(UINT32 flags, UINT32 *num_path_info, UIN BOOL WINAPI RegisterPointerDeviceNotifications(HWND hwnd, BOOL notifyrange) { FIXME("(%p %d): stub\n", hwnd, notifyrange); - return FALSE; + return TRUE; }
static const WCHAR imeW[] = {'I','M','E',0};
Fixes bug 45302.
Signed-off-by: Fabian Maurer dark.shadow4@web.de --- ...ms-win-rtcore-ntuser-wmpointer-l1-1-0.spec | 2 +- dlls/user32/misc.c | 17 ++++++++++++++++ dlls/user32/user32.spec | 1 + include/winuser.h | 20 +++++++++++++++++++ 4 files changed, 39 insertions(+), 1 deletion(-)
diff --git a/dlls/api-ms-win-rtcore-ntuser-wmpointer-l1-1-0/api-ms-win-rtcore-ntuser-wmpointer-l1-1-0.spec b/dlls/api-ms-win-rtcore-ntuser-wmpointer-l1-1-0/api-ms-win-rtcore-ntuser-wmpointer-l1-1-0.spec index 72cfe3d954..3a043dc9c2 100644 --- a/dlls/api-ms-win-rtcore-ntuser-wmpointer-l1-1-0/api-ms-win-rtcore-ntuser-wmpointer-l1-1-0.spec +++ b/dlls/api-ms-win-rtcore-ntuser-wmpointer-l1-1-0/api-ms-win-rtcore-ntuser-wmpointer-l1-1-0.spec @@ -4,7 +4,7 @@ @ stub GetPointerDevice @ stub GetPointerDeviceProperties @ stub GetPointerDeviceRects -@ stub GetPointerDevices +@ stdcall GetPointerDevices(ptr ptr) user32.GetPointerDevices @ stub GetPointerFrameInfo @ stub GetPointerFrameInfoHistory @ stub GetPointerFramePenInfo diff --git a/dlls/user32/misc.c b/dlls/user32/misc.c index c3f4030a90..4cc54df412 100644 --- a/dlls/user32/misc.c +++ b/dlls/user32/misc.c @@ -846,6 +846,23 @@ BOOL WINAPI RegisterPointerDeviceNotifications(HWND hwnd, BOOL notifyrange) return TRUE; }
+/********************************************************************** + * GetPointerDevices [USER32.@] + */ +BOOL WINAPI GetPointerDevices(UINT32 *device_count, POINTER_DEVICE_INFO *devices) +{ + FIXME("(%p %p): stub\n", device_count, devices); + + if (!device_count) + return FALSE; + + if (!devices) + *device_count = 0; + + return TRUE; +} + + static const WCHAR imeW[] = {'I','M','E',0}; const struct builtin_class_descr IME_builtin_class = { diff --git a/dlls/user32/user32.spec b/dlls/user32/user32.spec index 2e5b203a85..7f652ee722 100644 --- a/dlls/user32/user32.spec +++ b/dlls/user32/user32.spec @@ -354,6 +354,7 @@ @ stdcall GetOpenClipboardWindow() @ stdcall GetParent(long) @ stdcall GetPhysicalCursorPos(ptr) +@ stdcall GetPointerDevices(ptr ptr) @ stdcall GetPriorityClipboardFormat(ptr long) @ stdcall GetProcessDefaultLayout(ptr) @ stdcall GetProcessDpiAwarenessInternal(long ptr) diff --git a/include/winuser.h b/include/winuser.h index 648efbe0e2..f546a4a1f3 100644 --- a/include/winuser.h +++ b/include/winuser.h @@ -3357,6 +3357,26 @@ typedef struct tagGESTUREINFO { } GESTUREINFO, *PGESTUREINFO; typedef GESTUREINFO const * PCGESTUREINFO;
+#define POINTER_DEVICE_PRODUCT_STRING_MAX 520 + +typedef enum tagPOINTER_DEVICE_TYPE { + POINTER_DEVICE_TYPE_INTEGRATED_PEN = 0x00000001, + POINTER_DEVICE_TYPE_EXTERNAL_PEN = 0x00000002, + POINTER_DEVICE_TYPE_TOUCH = 0x00000003, + POINTER_DEVICE_TYPE_TOUCH_PAD = 0x00000004, + POINTER_DEVICE_TYPE_MAX = 0xFFFFFFFF +} POINTER_DEVICE_TYPE; + +typedef struct tagPOINTER_DEVICE_INFO { + DWORD displayOrientation; + HANDLE device; + POINTER_DEVICE_TYPE pointerDeviceType; + HMONITOR monitor; + ULONG startingCursorId; + USHORT maxActiveContacts; + WCHAR productString[POINTER_DEVICE_PRODUCT_STRING_MAX]; +} POINTER_DEVICE_INFO; + #if defined(_WINGDI_) && !defined(NOGDI) WINUSERAPI LONG WINAPI ChangeDisplaySettingsA(LPDEVMODEA,DWORD); WINUSERAPI LONG WINAPI ChangeDisplaySettingsW(LPDEVMODEW,DWORD);
Fixes bug 45303.
Signed-off-by: Fabian Maurer dark.shadow4@web.de --- dlls/user32/misc.c | 9 +++++++++ dlls/user32/user32.spec | 1 + 2 files changed, 10 insertions(+)
diff --git a/dlls/user32/misc.c b/dlls/user32/misc.c index 4cc54df412..b91aa3c7cc 100644 --- a/dlls/user32/misc.c +++ b/dlls/user32/misc.c @@ -862,6 +862,15 @@ BOOL WINAPI GetPointerDevices(UINT32 *device_count, POINTER_DEVICE_INFO *devices return TRUE; }
+/********************************************************************** + * RegisterTouchHitTestingWindow [USER32.@] + */ +BOOL WINAPI RegisterTouchHitTestingWindow(HWND hwnd, ULONG value) +{ + FIXME("(%p %d): stub\n", hwnd, value); + return TRUE; +} +
static const WCHAR imeW[] = {'I','M','E',0}; const struct builtin_class_descr IME_builtin_class = diff --git a/dlls/user32/user32.spec b/dlls/user32/user32.spec index 7f652ee722..61e0e4e8cc 100644 --- a/dlls/user32/user32.spec +++ b/dlls/user32/user32.spec @@ -606,6 +606,7 @@ @ stdcall RegisterShellHookWindow (long) @ stdcall RegisterSystemThread(long long) @ stdcall RegisterTasklist (long) +@ stdcall RegisterTouchHitTestingWindow(long long) @ stdcall RegisterTouchWindow(long long) # @ stub RegisterUserApiHook @ stdcall RegisterWindowMessageA(str)
Thanks for your feedback,
I updated my GetPointerDevices stub to return FALSE when the application tries to load devices - now we only success if it queries the number of devices - and then we return 0. This should be alright.
I made a small testcase to test if windows returns success for RegisterTouchHitTestingWindow when the system doesn't have a pointer device - it does. Since there is no touch device, it should be fine if we just never send the message - even if the window is "registered".
I'd add a testcase, but I'm not sure how to go about that - since it's not guaranteed that every machine the test runs one has 0 pointer devices. An idea how I could go about that?
Regards, Fabian Maurer
#################################### #define _WIN32_WINNT _WIN32_WINNT_WIN8 #include <windows.h> #include <stdio.h>
static LRESULT WINAPI WndProc(HWND hwnd, UINT message, WPARAM wParam, LPARAM lParam) { return DefWindowProcA(hwnd, message, wParam, lParam); }
int main(void) { BOOL success; UINT32 count; WNDCLASSA cls = {0}; HANDLE hwnd; POINTER_DEVICE_INFO devices[1];
cls.lpfnWndProc = WndProc; cls.hInstance = GetModuleHandleA(0); cls.hCursor = LoadCursorA(0, (LPCSTR)IDC_ARROW); cls.hbrBackground = GetStockObject(WHITE_BRUSH); cls.lpszClassName = "testclass"; RegisterClassA(&cls);
hwnd = CreateWindowA("testclass", "Test", WS_OVERLAPPEDWINDOW | WS_VISIBLE, 10, 10, 300, 300, NULL, NULL, NULL, 0); printf("Handle: %p\n", hwnd);
success = GetPointerDevices(&count, NULL); printf("success: %d, count: %d\n", success, count);
success = RegisterTouchHitTestingWindow(hwnd, TOUCH_HIT_TESTING_CLIENT); printf("success: %d\n", success);
count = 1; success = GetPointerDevices(&count, devices); printf("success: %d, count: %d\n", success, count);
return 0; }
#################################### output from testbot: Handle: 00070234 success: 1, count: 0 success: 1 success: 0, count: 1