Skip to content
GitLab
Explore
Sign in
Register
Primary navigation
Search or go to…
Project
wine
Manage
Activity
Members
Labels
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Package registry
Container registry
Model registry
Operate
Terraform modules
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
Sebastian Mayr
wine
Commits
64a929c4
Commit
64a929c4
authored
17 years ago
by
Jeremy White
Committed by
Alexandre Julliard
17 years ago
Browse files
Options
Downloads
Patches
Plain Diff
wintab32: Order the cursor array by the standard Wacom promulgates.
parent
047a9696
Branches
Branches containing commit
Tags
Tags containing commit
No related merge requests found
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
dlls/winex11.drv/wintab.c
+51
-1
51 additions, 1 deletion
dlls/winex11.drv/wintab.c
with
51 additions
and
1 deletion
dlls/winex11.drv/wintab.c
+
51
−
1
View file @
64a929c4
...
...
@@ -304,6 +304,55 @@ static int Tablet_ErrorHandler(Display *dpy, XErrorEvent *event, void* arg)
return
1
;
}
static
int
find_cursor_by_type
(
int
cursor_type
,
int
exclude
)
{
int
i
;
for
(
i
=
0
;
i
<
gNumCursors
;
i
++
)
if
(
i
!=
exclude
)
if
(
gSysCursor
[
i
].
TYPE
==
cursor_type
)
return
i
;
return
-
1
;
}
static
void
swap_cursors
(
int
a
,
int
b
)
{
WTI_CURSORS_INFO
temp
;
temp
=
gSysCursor
[
a
];
gSysCursor
[
a
]
=
gSysCursor
[
b
];
gSysCursor
[
b
]
=
temp
;
}
/* Adobe Photoshop 7.0 relies on the eraser being cursor #2 or #5, and it assumes the stylus is 1.
** If the X configuration is not set up that way, make it
*/
static
void
Tablet_FixupCursors
(
void
)
{
if
(
gNumCursors
>=
1
)
if
(
gSysCursor
[
1
].
TYPE
!=
CSR_TYPE_PEN
)
{
int
stylus
;
stylus
=
find_cursor_by_type
(
CSR_TYPE_PEN
,
1
);
if
(
stylus
>=
0
)
{
swap_cursors
(
1
,
stylus
);
TRACE
(
"Swapped cursor %d with stylus slot (1) for compatibility with older programs
\n
"
,
stylus
);
}
}
if
(
gNumCursors
>=
2
)
if
(
gSysCursor
[
2
].
TYPE
!=
CSR_TYPE_ERASER
)
{
int
eraser
;
eraser
=
find_cursor_by_type
(
CSR_TYPE_ERASER
,
2
);
if
(
eraser
>=
0
)
{
swap_cursors
(
2
,
eraser
);
TRACE
(
"Swapped cursor %d with eraser slot (2) for compatibility with older programs
\n
"
,
eraser
);
}
}
}
void
X11DRV_LoadTabletInfo
(
HWND
hwnddefault
)
{
const
WCHAR
SZ_CONTEXT_NAME
[]
=
{
'W'
,
'i'
,
'n'
,
'e'
,
' '
,
'T'
,
'a'
,
'b'
,
'l'
,
'e'
,
't'
,
' '
,
'C'
,
'o'
,
'n'
,
't'
,
'e'
,
'x'
,
't'
,
0
};
...
...
@@ -554,9 +603,10 @@ void X11DRV_LoadTabletInfo(HWND hwnddefault)
}
}
pXFreeDeviceList
(
devices
);
wine_tsx11_unlock
();
gSysDevice
.
NCSRTYPES
=
cursor_target
+
1
;
gNumCursors
=
cursor_target
+
1
;
Tablet_FixupCursors
();
wine_tsx11_unlock
();
}
static
int
figure_deg
(
int
x
,
int
y
)
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment