John Klehm : winex11: Always assign a tablet cursor type.
Alexandre Julliard
julliard at winehq.org
Fri Jul 18 10:03:14 CDT 2008
Module: wine
Branch: stable
Commit: b50b4c4b5a07bb23f9dbdc7729affaa511b6a00b
URL: http://source.winehq.org/git/wine.git/?a=commit;h=b50b4c4b5a07bb23f9dbdc7729affaa511b6a00b
Author: John Klehm <xixsimplicityxix at gmail.com>
Date: Sat May 31 15:51:46 2008 -0500
winex11: Always assign a tablet cursor type.
(cherry picked from commit 97b2dcb62cd7ca5c15c19d1fcb0cc2c96ab2e5bf)
---
dlls/winex11.drv/wintab.c | 13 ++++++++++---
1 files changed, 10 insertions(+), 3 deletions(-)
diff --git a/dlls/winex11.drv/wintab.c b/dlls/winex11.drv/wintab.c
index be72a21..691b1bb 100644
--- a/dlls/winex11.drv/wintab.c
+++ b/dlls/winex11.drv/wintab.c
@@ -227,7 +227,11 @@ typedef struct tagWTI_DEVICES_INFO
#define CSR_TYPE_ERASER 0x82a
#define CSR_TYPE_MOUSE_2D 0x007
#define CSR_TYPE_MOUSE_4D 0x094
-
+/* CSR_TYPE_OTHER is a special value! assumed no real world signifigance
+ * if a stylus type or eraser type eventually have this value
+ * it'll be a bug. As of 2008 05 21 we can be sure because
+ * linux wacom lists all the known values and this isn't one of them */
+#define CSR_TYPE_OTHER 0x000
typedef struct tagWTPACKET {
HCTX pkContext;
@@ -650,11 +654,14 @@ void X11DRV_LoadTabletInfo(HWND hwnddefault)
cursor->NPBTNMARKS[0] = 0 ;
cursor->NPBTNMARKS[1] = 1 ;
cursor->CAPABILITIES = CRC_MULTIMODE;
+
+ /* prefer finding TYPE_PEN(most capable) */
if (is_stylus(target->name, device_type))
cursor->TYPE = CSR_TYPE_PEN;
- if (is_eraser(target->name, device_type))
+ else if (is_eraser(target->name, device_type))
cursor->TYPE = CSR_TYPE_ERASER;
-
+ else
+ cursor->TYPE = CSR_TYPE_OTHER;
any = target->inputclassinfo;
More information about the wine-cvs
mailing list