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
dfa11dc0
Commit
dfa11dc0
authored
Oct 25, 2021
by
Rémi Bernon
Committed by
Alexandre Julliard
Oct 25, 2021
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
winex11.drv: Rename (x|y)_rel_valuator to (x|y)_valuator.
Signed-off-by:
Rémi Bernon
<
rbernon@codeweavers.com
>
Signed-off-by:
Alexandre Julliard
<
julliard@winehq.org
>
parent
da113878
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
17 additions
and
20 deletions
+17
-20
mouse.c
dlls/winex11.drv/mouse.c
+15
-18
x11drv.h
dlls/winex11.drv/x11drv.h
+2
-2
No files found.
dlls/winex11.drv/mouse.c
View file @
dfa11dc0
...
...
@@ -256,8 +256,8 @@ static void update_relative_valuators(XIAnyClassInfo **valuators, int n_valuator
struct
x11drv_thread_data
*
thread_data
=
x11drv_thread_data
();
int
i
;
thread_data
->
x_
rel_
valuator
.
number
=
-
1
;
thread_data
->
y_
rel_
valuator
.
number
=
-
1
;
thread_data
->
x_valuator
.
number
=
-
1
;
thread_data
->
y_valuator
.
number
=
-
1
;
for
(
i
=
0
;
i
<
n_valuators
;
i
++
)
{
...
...
@@ -265,10 +265,10 @@ static void update_relative_valuators(XIAnyClassInfo **valuators, int n_valuator
if
(
valuators
[
i
]
->
type
!=
XIValuatorClass
)
continue
;
if
(
class
->
label
==
x11drv_atom
(
Rel_X
)
||
(
!
class
->
label
&&
class
->
number
==
0
&&
class
->
mode
==
XIModeRelative
))
thread_data
->
x_
rel_
valuator
=
*
class
;
thread_data
->
x_valuator
=
*
class
;
else
if
(
class
->
label
==
x11drv_atom
(
Rel_Y
)
||
(
!
class
->
label
&&
class
->
number
==
1
&&
class
->
mode
==
XIModeRelative
))
thread_data
->
y_
rel_
valuator
=
*
class
;
thread_data
->
y_valuator
=
*
class
;
}
}
#endif
...
...
@@ -349,8 +349,8 @@ static void disable_xinput2(void)
pXISelectEvents
(
data
->
display
,
DefaultRootWindow
(
data
->
display
),
&
mask
,
1
);
pXIFreeDeviceInfo
(
data
->
xi2_devices
);
data
->
x_
rel_
valuator
.
number
=
-
1
;
data
->
y_
rel_
valuator
.
number
=
-
1
;
data
->
x_valuator
.
number
=
-
1
;
data
->
y_valuator
.
number
=
-
1
;
data
->
xi2_devices
=
NULL
;
data
->
xi2_core_pointer
=
0
;
data
->
xi2_current_slave
=
0
;
...
...
@@ -625,13 +625,13 @@ static void map_event_coords( HWND hwnd, Window window, Window event_root, int x
static
BOOL
map_raw_event_coords
(
XIRawEvent
*
event
,
INPUT
*
input
)
{
struct
x11drv_thread_data
*
thread_data
=
x11drv_thread_data
();
XIValuatorClassInfo
*
x
=
&
thread_data
->
x_valuator
,
*
y
=
&
thread_data
->
y_valuator
;
const
double
*
values
=
event
->
valuators
.
values
;
XIValuatorClassInfo
*
x_rel
,
*
y_rel
;
double
dx
=
0
,
dy
=
0
,
val
;
RECT
virtual_rect
;
int
i
;
if
(
thread_data
->
x_rel_valuator
.
number
<
0
||
thread_data
->
y_rel_valuator
.
number
<
0
)
return
FALSE
;
if
(
x
->
number
<
0
||
y
->
number
<
0
)
return
FALSE
;
if
(
!
event
->
valuators
.
mask_len
)
return
FALSE
;
if
(
thread_data
->
xi2_state
!=
xi_enabled
)
return
FALSE
;
...
...
@@ -654,26 +654,23 @@ static BOOL map_raw_event_coords( XIRawEvent *event, INPUT *input )
}
if
(
event
->
deviceid
!=
thread_data
->
xi2_current_slave
)
return
FALSE
;
x_rel
=
&
thread_data
->
x_rel_valuator
;
y_rel
=
&
thread_data
->
y_rel_valuator
;
virtual_rect
=
get_virtual_screen_rect
();
for
(
i
=
0
;
i
<=
max
(
x
_rel
->
number
,
y_rel
->
number
);
i
++
)
for
(
i
=
0
;
i
<=
max
(
x
->
number
,
y
->
number
);
i
++
)
{
if
(
!
XIMaskIsSet
(
event
->
valuators
.
mask
,
i
))
continue
;
val
=
*
values
++
;
if
(
i
==
x
_rel
->
number
)
if
(
i
==
x
->
number
)
{
input
->
u
.
mi
.
dx
=
dx
=
val
;
if
(
x
_rel
->
min
<
x_rel
->
max
)
input
->
u
.
mi
.
dx
=
val
*
(
virtual_rect
.
right
-
virtual_rect
.
left
)
/
(
x
_rel
->
max
-
x_rel
->
min
);
if
(
x
->
min
<
x
->
max
)
input
->
u
.
mi
.
dx
=
val
*
(
virtual_rect
.
right
-
virtual_rect
.
left
)
/
(
x
->
max
-
x
->
min
);
}
if
(
i
==
y
_rel
->
number
)
if
(
i
==
y
->
number
)
{
input
->
u
.
mi
.
dy
=
dy
=
val
;
if
(
y
_rel
->
min
<
y_rel
->
max
)
input
->
u
.
mi
.
dy
=
val
*
(
virtual_rect
.
bottom
-
virtual_rect
.
top
)
/
(
y
_rel
->
max
-
y_rel
->
min
);
if
(
y
->
min
<
y
->
max
)
input
->
u
.
mi
.
dy
=
val
*
(
virtual_rect
.
bottom
-
virtual_rect
.
top
)
/
(
y
->
max
-
y
->
min
);
}
}
...
...
dlls/winex11.drv/x11drv.h
View file @
dfa11dc0
...
...
@@ -335,8 +335,8 @@ struct x11drv_thread_data
enum
{
xi_unavailable
=
-
1
,
xi_unknown
,
xi_disabled
,
xi_enabled
}
xi2_state
;
/* XInput2 state */
void
*
xi2_devices
;
/* list of XInput2 devices (valid when state is enabled) */
int
xi2_device_count
;
XIValuatorClassInfo
x_
rel_
valuator
;
XIValuatorClassInfo
y_
rel_
valuator
;
XIValuatorClassInfo
x_valuator
;
XIValuatorClassInfo
y_valuator
;
int
xi2_core_pointer
;
/* XInput2 core pointer id */
int
xi2_current_slave
;
/* Current slave driving the Core pointer */
#endif
/* HAVE_X11_EXTENSIONS_XINPUT2_H */
...
...
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