Module: wine Branch: master Commit: 33d4117e1b988edbe0f7fa09817d97dcd920117d URL: http://source.winehq.org/git/wine.git/?a=commit;h=33d4117e1b988edbe0f7fa0981...
Author: John Klehm xixsimplicityxix@gmail.com Date: Thu Apr 17 09:48:50 2008 -0500
winex11: Allow wizardpen to be detected as a stylus.
---
dlls/winex11.drv/wintab.c | 18 ++++++++++++++---- 1 files changed, 14 insertions(+), 4 deletions(-)
diff --git a/dlls/winex11.drv/wintab.c b/dlls/winex11.drv/wintab.c index 8a2afd1..37596ba 100644 --- a/dlls/winex11.drv/wintab.c +++ b/dlls/winex11.drv/wintab.c @@ -414,10 +414,20 @@ static BOOL is_tablet_cursor(const char *name, const char *type)
static BOOL is_stylus(const char *name, const char *type) { - if (name && match_token(name, "stylus")) - return TRUE; - if (type && match_token(type, "stylus")) - return TRUE; + int i; + static const char* tablet_stylus_whitelist[] = { + "stylus", + "wizardpen", + NULL + }; + + for (i=0; tablet_stylus_whitelist[i] != NULL; i++) { + if (name && match_token(name, tablet_stylus_whitelist[i])) + return TRUE; + if (type && match_token(type, tablet_stylus_whitelist[i])) + return TRUE; + } + return FALSE; }