Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
W
wine-fonts
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
Aleksandr Isakov
wine-fonts
Commits
dd8548b8
Commit
dd8548b8
authored
Oct 28, 2021
by
Rémi Bernon
Committed by
Vitaly Lipatov
Jul 30, 2022
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
winex11.drv: Add support for absolute RawMotion events.
parent
8a13a759
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
22 additions
and
6 deletions
+22
-6
mouse.c
dlls/winex11.drv/mouse.c
+22
-6
No files found.
dlls/winex11.drv/mouse.c
View file @
dd8548b8
...
...
@@ -340,12 +340,18 @@ static void update_relative_valuators( XIAnyClassInfo **classes, int num_classes
{
valuator
=
(
XIValuatorClassInfo
*
)
classes
[
num_classes
];
if
(
classes
[
num_classes
]
->
type
!=
XIValuatorClass
)
continue
;
if
(
valuator
->
number
==
0
&&
valuator
->
mode
==
XIModeRelative
)
thread_data
->
x_valuator
=
*
valuator
;
if
(
valuator
->
number
==
1
&&
valuator
->
mode
==
XIModeRelative
)
thread_data
->
y_valuator
=
*
valuator
;
if
(
valuator
->
number
==
0
)
thread_data
->
x_valuator
=
*
valuator
;
if
(
valuator
->
number
==
1
)
thread_data
->
y_valuator
=
*
valuator
;
}
if
(
thread_data
->
x_valuator
.
number
<
0
||
thread_data
->
y_valuator
.
number
<
0
)
WARN
(
"X/Y axis valuators not found, ignoring RawMotion events
\n
"
);
else
if
(
thread_data
->
x_valuator
.
mode
!=
thread_data
->
y_valuator
.
mode
)
{
WARN
(
"Relative/Absolute mismatch between X/Y axis, ignoring RawMotion events
\n
"
);
thread_data
->
x_valuator
.
number
=
-
1
;
thread_data
->
y_valuator
.
number
=
-
1
;
}
thread_data
->
x_valuator
.
value
=
0
;
thread_data
->
y_valuator
.
value
=
0
;
...
...
@@ -1979,7 +1985,15 @@ static BOOL map_raw_event_coords( XIRawEvent *event, INPUT *input )
if
(
thread_data
->
xi2_state
!=
xi_enabled
)
return
FALSE
;
if
(
event
->
deviceid
!=
thread_data
->
xi2_core_pointer
)
return
FALSE
;
virtual_rect
=
NtUserGetVirtualScreenRect
();
if
(
x
->
mode
==
XIModeRelative
&&
y
->
mode
==
XIModeRelative
)
input
->
u
.
mi
.
dwFlags
&=
~
(
MOUSEEVENTF_ABSOLUTE
|
MOUSEEVENTF_VIRTUALDESK
);
else
if
(
x
->
mode
==
XIModeAbsolute
&&
y
->
mode
==
XIModeAbsolute
)
input
->
u
.
mi
.
dwFlags
|=
MOUSEEVENTF_ABSOLUTE
|
MOUSEEVENTF_VIRTUALDESK
;
else
FIXME
(
"Unsupported relative/absolute X/Y axis mismatch
\n
."
);
if
(
input
->
u
.
mi
.
dwFlags
&
MOUSEEVENTF_VIRTUALDESK
)
SetRect
(
&
virtual_rect
,
0
,
0
,
65535
,
65535
);
else
virtual_rect
=
NtUserGetVirtualScreenRect
();
if
(
x
->
max
<=
x
->
min
)
x_scale
=
1
;
else
x_scale
=
(
virtual_rect
.
right
-
virtual_rect
.
left
)
/
(
x
->
max
-
x
->
min
);
...
...
@@ -1992,12 +2006,14 @@ static BOOL map_raw_event_coords( XIRawEvent *event, INPUT *input )
if
(
i
==
x
->
number
)
{
x_value
=
*
values
;
x
->
value
+=
x_value
*
x_scale
;
if
(
x
->
mode
==
XIModeRelative
)
x
->
value
+=
x_value
*
x_scale
;
else
x
->
value
=
(
x_value
-
x
->
min
)
*
x_scale
;
}
if
(
i
==
y
->
number
)
{
y_value
=
*
values
;
y
->
value
+=
y_value
*
y_scale
;
if
(
y
->
mode
==
XIModeRelative
)
y
->
value
+=
y_value
*
y_scale
;
else
y
->
value
=
(
y_value
-
y
->
min
)
*
y_scale
;
}
values
++
;
}
...
...
@@ -2010,7 +2026,7 @@ static BOOL map_raw_event_coords( XIRawEvent *event, INPUT *input )
x
->
value
-=
input
->
u
.
mi
.
dx
;
y
->
value
-=
input
->
u
.
mi
.
dy
;
if
(
!
input
->
u
.
mi
.
dx
&&
!
input
->
u
.
mi
.
dy
)
if
(
!
(
input
->
u
.
mi
.
dwFlags
&
MOUSEEVENTF_ABSOLUTE
)
&&
!
input
->
u
.
mi
.
dx
&&
!
input
->
u
.
mi
.
dy
)
{
TRACE
(
"accumulating motion
\n
"
);
return
FALSE
;
...
...
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