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
51fbfa41
Commit
51fbfa41
authored
Jan 17, 2020
by
Rémi Bernon
Committed by
Vitaly Lipatov
Jul 30, 2022
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
winex11.drv: Split XInput2 thread initialization.
And rename the library and function loader to x11drv_xinput_load.
parent
b291d92a
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
36 additions
and
17 deletions
+36
-17
mouse.c
dlls/winex11.drv/mouse.c
+31
-15
x11drv.h
dlls/winex11.drv/x11drv.h
+2
-1
x11drv_main.c
dlls/winex11.drv/x11drv_main.c
+3
-1
No files found.
dlls/winex11.drv/mouse.c
View file @
51fbfa41
...
...
@@ -279,6 +279,32 @@ static void update_relative_valuators(XIAnyClassInfo **valuators, int n_valuator
/***********************************************************************
* x11drv_xinput_init
*/
void
x11drv_xinput_init
(
void
)
{
#ifdef HAVE_X11_EXTENSIONS_XINPUT2_H
struct
x11drv_thread_data
*
data
=
x11drv_thread_data
();
int
major
=
2
,
minor
=
0
;
if
(
data
->
xi2_state
!=
xi_unknown
)
return
;
if
(
xinput2_available
&&
!
pXIQueryVersion
(
data
->
display
,
&
major
,
&
minor
))
{
TRACE
(
"XInput2 %d.%d available
\n
"
,
major
,
minor
);
data
->
xi2_state
=
xi_disabled
;
}
else
{
data
->
xi2_state
=
xi_unavailable
;
WARN
(
"XInput 2.0 not available
\n
"
);
}
#endif
}
/***********************************************************************
* enable_xinput2
*/
static
void
enable_xinput2
(
void
)
...
...
@@ -289,19 +315,9 @@ static void enable_xinput2(void)
unsigned
char
mask_bits
[
XIMaskLen
(
XI_LASTEVENT
)];
int
count
;
if
(
!
xinput2_available
)
return
;
TRACE
(
"state:%d
\n
"
,
data
->
xi2_state
);
if
(
data
->
xi2_state
!=
xi_disabled
)
return
;
if
(
data
->
xi2_state
==
xi_unknown
)
{
int
major
=
2
,
minor
=
0
;
if
(
!
pXIQueryVersion
(
data
->
display
,
&
major
,
&
minor
))
data
->
xi2_state
=
xi_disabled
;
else
{
data
->
xi2_state
=
xi_unavailable
;
WARN
(
"X Input 2 not available
\n
"
);
}
}
if
(
data
->
xi2_state
==
xi_unavailable
)
return
;
if
(
!
pXIGetClientPointer
(
data
->
display
,
None
,
&
data
->
xi2_core_pointer
))
return
;
mask
.
mask
=
mask_bits
;
...
...
@@ -342,9 +358,9 @@ static void disable_xinput2(void)
struct
x11drv_thread_data
*
data
=
x11drv_thread_data
();
XIEventMask
mask
;
TRACE
(
"state:%d
\n
"
,
data
->
xi2_state
);
if
(
data
->
xi2_state
!=
xi_enabled
)
return
;
TRACE
(
"disabling
\n
"
);
data
->
xi2_state
=
xi_disabled
;
mask
.
mask
=
NULL
;
...
...
@@ -1952,9 +1968,9 @@ static BOOL X11DRV_RawMotion( XGenericEventCookie *xev )
/***********************************************************************
*
X11DRV_XInput2_Init
*
x11drv_xinput_load
*/
void
X11DRV_XInput2_Init
(
void
)
void
x11drv_xinput_load
(
void
)
{
#if defined(SONAME_LIBXI) && defined(HAVE_X11_EXTENSIONS_XINPUT2_H)
int
event
,
error
;
...
...
dlls/winex11.drv/x11drv.h
View file @
51fbfa41
...
...
@@ -258,7 +258,8 @@ extern void X11DRV_ThreadDetach(void) DECLSPEC_HIDDEN;
/* X11 driver internal functions */
extern
void
X11DRV_Xcursor_Init
(
void
)
DECLSPEC_HIDDEN
;
extern
void
X11DRV_XInput2_Init
(
void
)
DECLSPEC_HIDDEN
;
extern
void
x11drv_xinput_load
(
void
)
DECLSPEC_HIDDEN
;
extern
void
x11drv_xinput_init
(
void
)
DECLSPEC_HIDDEN
;
extern
DWORD
copy_image_bits
(
BITMAPINFO
*
info
,
BOOL
is_r8g8b8
,
XImage
*
image
,
const
struct
gdi_image_bits
*
src_bits
,
struct
gdi_image_bits
*
dst_bits
,
...
...
dlls/winex11.drv/x11drv_main.c
View file @
51fbfa41
...
...
@@ -705,7 +705,7 @@ static NTSTATUS x11drv_init( void *arg )
#ifdef SONAME_LIBXCOMPOSITE
X11DRV_XComposite_Init
();
#endif
X11DRV_XInput2_Init
();
x11drv_xinput_load
();
#ifdef HAVE_XKB
if
(
use_xkb
)
use_xkb
=
XkbUseExtension
(
gdi_display
,
NULL
,
NULL
);
...
...
@@ -800,6 +800,8 @@ struct x11drv_thread_data *x11drv_init_thread_data(void)
if
(
use_xim
)
X11DRV_SetupXIM
();
x11drv_xinput_init
();
return
data
;
}
...
...
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