d3d8: Accept CURSOR_SUPPRESSED as cursor flags.
Vincent Povirk
madewokherd at gmail.com
Mon Nov 23 15:36:55 CST 2015
-------------- next part --------------
From 991cf24de10f1044e20a9f0ce267069a2012975d Mon Sep 17 00:00:00 2001
From: Vincent Povirk <vincent at codeweavers.com>
Date: Mon, 23 Nov 2015 15:31:28 -0600
Subject: [PATCH] d3d8: Accept CURSOR_SUPPRESSED as cursor flags.
On Windows 8, any input received from a touchscreen hides the cursor and sets
this flag. Input from a relative pointer shows the cursor and clears the flag.
Signed-off-by: Vincent Povirk <vincent at codeweavers.com>
---
dlls/d3d8/tests/device.c | 7 +++++--
include/winuser.h | 3 +++
2 files changed, 8 insertions(+), 2 deletions(-)
diff --git a/dlls/d3d8/tests/device.c b/dlls/d3d8/tests/device.c
index 827f144..ab15817 100644
--- a/dlls/d3d8/tests/device.c
+++ b/dlls/d3d8/tests/device.c
@@ -21,6 +21,7 @@
* Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA
*/
+#define WINVER 0x0602 /* for CURSOR_SUPPRESSED */
#define COBJMACROS
#include <initguid.h>
#include <d3d8.h>
@@ -853,7 +854,8 @@ static void test_cursor(void)
memset(&info, 0, sizeof(info));
info.cbSize = sizeof(info);
ok(pGetCursorInfo(&info), "GetCursorInfo failed\n");
- ok(info.flags & CURSOR_SHOWING, "The gdi cursor is hidden (%08x)\n", info.flags);
+ ok((info.flags & CURSOR_SHOWING) != 0 || info.flags == CURSOR_SUPPRESSED,
+ "The gdi cursor is hidden (%08x)\n", info.flags);
ok(info.hCursor == cur, "The cursor handle is %p\n", info.hCursor); /* unchanged */
/* Still hidden */
@@ -867,7 +869,8 @@ static void test_cursor(void)
memset(&info, 0, sizeof(info));
info.cbSize = sizeof(info);
ok(pGetCursorInfo(&info), "GetCursorInfo failed\n");
- ok(info.flags & CURSOR_SHOWING, "The gdi cursor is hidden (%08x)\n", info.flags);
+ ok((info.flags & CURSOR_SHOWING) != 0 || info.flags == CURSOR_SUPPRESSED,
+ "The gdi cursor is hidden (%08x)\n", info.flags);
ok(info.hCursor != cur, "The cursor handle is %p\n", info.hCursor);
refcount = IDirect3DDevice8_Release(device);
diff --git a/include/winuser.h b/include/winuser.h
index 1d3759a..b009d66 100644
--- a/include/winuser.h
+++ b/include/winuser.h
@@ -1533,6 +1533,9 @@ typedef struct tagCURSORINFO
} CURSORINFO, *PCURSORINFO, *LPCURSORINFO;
#define CURSOR_SHOWING 0x00000001
+#if (WINVER >= 0x0602)
+#define CURSOR_SUPPRESSED 0x00000002
+#endif
/* this is the 6 byte accel struct used in Win32 when presented to the user */
typedef struct tagACCEL
--
2.5.0
More information about the wine-patches
mailing list