Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
W
wine-winehq
Project
Project
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Registry
Registry
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
wine
wine-winehq
Commits
8e4d5d21
Commit
8e4d5d21
authored
Mar 13, 2008
by
Dan Kegel
Committed by
Alexandre Julliard
Mar 13, 2008
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
wintab: Expand whitelist of tablets.
parent
8746e387
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
22 additions
and
27 deletions
+22
-27
wintab.c
dlls/winex11.drv/wintab.c
+22
-27
No files found.
dlls/winex11.drv/wintab.c
View file @
8e4d5d21
...
@@ -388,23 +388,27 @@ BOOL match_token(const char *haystack, const char *needle)
...
@@ -388,23 +388,27 @@ BOOL match_token(const char *haystack, const char *needle)
** by Wacom tablets. This code will likely need to be expanded for alternate tablet types
** by Wacom tablets. This code will likely need to be expanded for alternate tablet types
*/
*/
#define IS_TABLET_CURSOR(n, t) (is_wacom((n), (t)) || is_cursor((n), (t)) || is_stylus((n), (t)) || is_eraser((n), (t)) || is_pad((n), (t)))
static
BOOL
is_tablet_cursor
(
const
char
*
name
,
const
char
*
type
)
static
BOOL
is_wacom
(
const
char
*
name
,
const
char
*
type
)
{
if
(
name
&&
match_token
(
name
,
"wacom"
))
return
TRUE
;
if
(
type
&&
match_token
(
type
,
"wacom"
))
return
TRUE
;
return
FALSE
;
}
static
BOOL
is_cursor
(
const
char
*
name
,
const
char
*
type
)
{
{
if
(
name
&&
match_token
(
name
,
"cursor"
))
int
i
;
return
TRUE
;
static
const
char
*
tablet_cursor_whitelist
[]
=
{
if
(
type
&&
match_token
(
type
,
"cursor"
))
"wacom"
,
return
TRUE
;
"wizardpen"
,
"acecad"
,
"tablet"
,
"cursor"
,
"stylus"
,
"eraser"
,
"pad"
,
NULL
};
for
(
i
=
0
;
tablet_cursor_whitelist
[
i
]
!=
NULL
;
i
++
)
{
if
(
name
&&
match_token
(
name
,
tablet_cursor_whitelist
[
i
]))
return
TRUE
;
if
(
type
&&
match_token
(
type
,
tablet_cursor_whitelist
[
i
]))
return
TRUE
;
}
return
FALSE
;
return
FALSE
;
}
}
...
@@ -426,15 +430,6 @@ static BOOL is_eraser(const char *name, const char *type)
...
@@ -426,15 +430,6 @@ static BOOL is_eraser(const char *name, const char *type)
return
FALSE
;
return
FALSE
;
}
}
static
BOOL
is_pad
(
const
char
*
name
,
const
char
*
type
)
{
if
(
name
&&
match_token
(
name
,
"pad"
))
return
TRUE
;
if
(
type
&&
match_token
(
type
,
"pad"
))
return
TRUE
;
return
FALSE
;
}
/***********************************************************************
/***********************************************************************
* X11DRV_LoadTabletInfo (X11DRV.@)
* X11DRV_LoadTabletInfo (X11DRV.@)
...
@@ -580,9 +575,9 @@ void X11DRV_LoadTabletInfo(HWND hwnddefault)
...
@@ -580,9 +575,9 @@ void X11DRV_LoadTabletInfo(HWND hwnddefault)
}
}
MultiByteToWideChar
(
CP_UNIXCP
,
0
,
target
->
name
,
-
1
,
cursor
->
NAME
,
WT_MAX_NAME_LEN
);
MultiByteToWideChar
(
CP_UNIXCP
,
0
,
target
->
name
,
-
1
,
cursor
->
NAME
,
WT_MAX_NAME_LEN
);
if
(
!
IS_TABLET_CURSOR
(
target
->
name
,
device_type
))
if
(
!
is_tablet_cursor
(
target
->
name
,
device_type
))
{
{
WARN
(
"Skipping device %d [name %s|type %s]; not apparently a tablet cursor type device
\n
"
,
WARN
(
"Skipping device %d [name %s|type %s]; not apparently a tablet cursor type device
. If this is wrong, please report to http://forums.winehq.org
\n
"
,
loop
,
devices
[
loop
].
name
,
device_type
?
device_type
:
""
);
loop
,
devices
[
loop
].
name
,
device_type
?
device_type
:
""
);
XFree
(
device_type
);
XFree
(
device_type
);
cursor_target
--
;
cursor_target
--
;
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment