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
da113878
Commit
da113878
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: Use XIValuatorClassInfo instead of a custom struct.
Signed-off-by:
Rémi Bernon
<
rbernon@codeweavers.com
>
Signed-off-by:
Alexandre Julliard
<
julliard@winehq.org
>
parent
7bc5b680
Show whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
13 additions
and
24 deletions
+13
-24
mouse.c
dlls/winex11.drv/mouse.c
+3
-15
window.c
dlls/winex11.drv/window.c
+3
-0
x11drv.h
dlls/winex11.drv/x11drv.h
+7
-9
No files found.
dlls/winex11.drv/mouse.c
View file @
da113878
...
...
@@ -262,25 +262,13 @@ static void update_relative_valuators(XIAnyClassInfo **valuators, int n_valuator
for
(
i
=
0
;
i
<
n_valuators
;
i
++
)
{
XIValuatorClassInfo
*
class
=
(
XIValuatorClassInfo
*
)
valuators
[
i
];
struct
x11drv_valuator_data
*
valuator_data
=
NULL
;
if
(
valuators
[
i
]
->
type
!=
XIValuatorClass
)
continue
;
if
(
class
->
label
==
x11drv_atom
(
Rel_X
)
||
(
!
class
->
label
&&
class
->
number
==
0
&&
class
->
mode
==
XIModeRelative
))
{
valuator_data
=
&
thread_data
->
x_rel_valuator
;
}
thread_data
->
x_rel_valuator
=
*
class
;
else
if
(
class
->
label
==
x11drv_atom
(
Rel_Y
)
||
(
!
class
->
label
&&
class
->
number
==
1
&&
class
->
mode
==
XIModeRelative
))
{
valuator_data
=
&
thread_data
->
y_rel_valuator
;
}
if
(
valuator_data
)
{
valuator_data
->
number
=
class
->
number
;
valuator_data
->
min
=
class
->
min
;
valuator_data
->
max
=
class
->
max
;
}
thread_data
->
y_rel_valuator
=
*
class
;
}
}
#endif
...
...
@@ -638,7 +626,7 @@ static BOOL map_raw_event_coords( XIRawEvent *event, INPUT *input )
{
struct
x11drv_thread_data
*
thread_data
=
x11drv_thread_data
();
const
double
*
values
=
event
->
valuators
.
values
;
struct
x11drv_valuator_data
*
x_rel
,
*
y_rel
;
XIValuatorClassInfo
*
x_rel
,
*
y_rel
;
double
dx
=
0
,
dy
=
0
,
val
;
RECT
virtual_rect
;
int
i
;
...
...
dlls/winex11.drv/window.c
View file @
da113878
...
...
@@ -36,6 +36,9 @@
#ifdef HAVE_LIBXSHAPE
#include <X11/extensions/shape.h>
#endif
/* HAVE_LIBXSHAPE */
#ifdef HAVE_X11_EXTENSIONS_XINPUT2_H
#include <X11/extensions/XInput2.h>
#endif
/* avoid conflict with field names in included win32 headers */
#undef Status
...
...
dlls/winex11.drv/x11drv.h
View file @
da113878
...
...
@@ -32,6 +32,9 @@
#include <X11/Xresource.h>
#include <X11/Xutil.h>
#include <X11/Xatom.h>
#ifdef HAVE_X11_EXTENSIONS_XINPUT2_H
#include <X11/extensions/XInput2.h>
#endif
#define BOOL X_BOOL
#define BYTE X_BYTE
...
...
@@ -314,13 +317,6 @@ struct x11drv_escape_flush_gl_drawable
* X11 USER driver
*/
struct
x11drv_valuator_data
{
double
min
;
double
max
;
int
number
;
};
struct
x11drv_thread_data
{
Display
*
display
;
...
...
@@ -335,13 +331,15 @@ struct x11drv_thread_data
Window
clip_window
;
/* window used for cursor clipping */
HWND
clip_hwnd
;
/* message window stored in desktop while clipping is active */
DWORD
clip_reset
;
/* time when clipping was last reset */
#ifdef HAVE_X11_EXTENSIONS_XINPUT2_H
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
;
struct
x11drv_valuator_data
x_rel_valuator
;
struct
x11drv_valuator_data
y_rel_valuator
;
XIValuatorClassInfo
x_rel_valuator
;
XIValuatorClassInfo
y_rel_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 */
};
extern
struct
x11drv_thread_data
*
x11drv_init_thread_data
(
void
)
DECLSPEC_HIDDEN
;
...
...
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