mirror of
https://github.com/brl/mutter.git
synced 2024-11-25 01:20:42 -05:00
device-map: Initialize XInput 2.1
This is needed in order to use the Multitouch API.
This commit is contained in:
parent
afa4c643a8
commit
45450c2fa3
@ -214,15 +214,24 @@ initialize_xinput (MetaDisplay *display)
|
|||||||
&opcode, &unused, &unused))
|
&opcode, &unused, &unused))
|
||||||
return FALSE;
|
return FALSE;
|
||||||
|
|
||||||
major = XINPUT2_VERSION_MAJOR;
|
major = XI_2_Major;
|
||||||
minor = XINPUT2_VERSION_MINOR;
|
#ifdef HAVE_XTOUCH
|
||||||
|
minor = XI_2_1_Minor;
|
||||||
|
#else
|
||||||
|
minor = XI_2_Minor;
|
||||||
|
#endif /* HAVE_XTOUCH */
|
||||||
|
|
||||||
XIQueryVersion (display->xdisplay, &major, &minor);
|
XIQueryVersion (display->xdisplay, &major, &minor);
|
||||||
|
|
||||||
if (major == XINPUT2_VERSION_MAJOR &&
|
if (major == XI_2_Major &&
|
||||||
minor == XINPUT2_VERSION_MINOR)
|
(
|
||||||
|
#ifdef HAVE_XTOUCH
|
||||||
|
minor == XI_2_1_Minor ||
|
||||||
|
#endif /* HAVE_XTOUCH */
|
||||||
|
minor == XI_2_Minor))
|
||||||
{
|
{
|
||||||
display->have_xinput2 = TRUE;
|
display->have_xinput2 = TRUE;
|
||||||
|
display->have_xtouch = (minor >= XI_2_1_Minor);
|
||||||
display->xinput2_opcode = opcode;
|
display->xinput2_opcode = opcode;
|
||||||
|
|
||||||
return TRUE;
|
return TRUE;
|
||||||
|
@ -320,6 +320,9 @@ struct _MetaDisplay
|
|||||||
#ifdef HAVE_XINPUT2
|
#ifdef HAVE_XINPUT2
|
||||||
int xinput2_opcode;
|
int xinput2_opcode;
|
||||||
unsigned int have_xinput2 : 1;
|
unsigned int have_xinput2 : 1;
|
||||||
|
#ifdef HAVE_XTOUCH
|
||||||
|
unsigned int have_xtouch : 1;
|
||||||
|
#endif /* HAVE_XTOUCH */
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
#ifdef HAVE_XSYNC
|
#ifdef HAVE_XSYNC
|
||||||
|
Loading…
Reference in New Issue
Block a user