[platforms/x11] Do not grab touch events

Summary:
Grabbing the touch events seems to cause issues. It seems to also grab
pointer events from touchpad and breaks touch input on other events.

Also testing shows that we don't need it and get touch ownership events
for our screenedge windows reported.

BUG: 378951

Test Plan: Triggered touch screen edge, normal system usage on X11

Reviewers: #plasma, #kwin

Subscribers: plasma-devel, kwin

Tags: #kwin

Differential Revision: https://phabricator.kde.org/D5520
This commit is contained in:
Martin Gräßlin 2017-04-20 07:11:47 +02:00
parent 919b497f90
commit a5735e19b9

View file

@ -282,24 +282,6 @@ void XInputIntegration::startListening()
evmasks[0].mask = mask1;
XISelectEvents(display(), rootWindow(), evmasks, 1);
if (m_majorVersion >=2 && m_minorVersion >= 2) {
XIGrabModifiers mods = { int(XIAnyModifier), 0 };
XIEventMask touchEvmasks[1];
unsigned char touchMask[XIMaskLen(XI_LASTEVENT)];
memset(touchMask, 0, sizeof(touchMask));
XISetMask(touchMask, XI_TouchBegin);
XISetMask(touchMask, XI_TouchUpdate);
XISetMask(touchMask, XI_TouchOwnership);
XISetMask(touchMask, XI_TouchEnd);
touchEvmasks[0].deviceid = XIAllMasterDevices;
touchEvmasks[0].mask_len = sizeof(touchMask);
touchEvmasks[0].mask = touchMask;
XIGrabTouchBegin(display(), XIAllMasterDevices, rootWindow(), False, touchEvmasks, 1, &mods);
}
m_xiEventFilter.reset(new XInputEventFilter(m_xiOpcode));
m_xiEventFilter->setCursor(m_x11Cursor);
m_xiEventFilter->setDisplay(display());