mirror of
https://github.com/brl/mutter.git
synced 2024-11-24 17:10:40 -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))
|
||||
return FALSE;
|
||||
|
||||
major = XINPUT2_VERSION_MAJOR;
|
||||
minor = XINPUT2_VERSION_MINOR;
|
||||
major = XI_2_Major;
|
||||
#ifdef HAVE_XTOUCH
|
||||
minor = XI_2_1_Minor;
|
||||
#else
|
||||
minor = XI_2_Minor;
|
||||
#endif /* HAVE_XTOUCH */
|
||||
|
||||
XIQueryVersion (display->xdisplay, &major, &minor);
|
||||
|
||||
if (major == XINPUT2_VERSION_MAJOR &&
|
||||
minor == XINPUT2_VERSION_MINOR)
|
||||
if (major == XI_2_Major &&
|
||||
(
|
||||
#ifdef HAVE_XTOUCH
|
||||
minor == XI_2_1_Minor ||
|
||||
#endif /* HAVE_XTOUCH */
|
||||
minor == XI_2_Minor))
|
||||
{
|
||||
display->have_xinput2 = TRUE;
|
||||
display->have_xtouch = (minor >= XI_2_1_Minor);
|
||||
display->xinput2_opcode = opcode;
|
||||
|
||||
return TRUE;
|
||||
|
@ -320,6 +320,9 @@ struct _MetaDisplay
|
||||
#ifdef HAVE_XINPUT2
|
||||
int xinput2_opcode;
|
||||
unsigned int have_xinput2 : 1;
|
||||
#ifdef HAVE_XTOUCH
|
||||
unsigned int have_xtouch : 1;
|
||||
#endif /* HAVE_XTOUCH */
|
||||
#endif
|
||||
|
||||
#ifdef HAVE_XSYNC
|
||||
|
Loading…
Reference in New Issue
Block a user