From a5735e19b99d21d843252dcb12a147d122760371 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Martin=20Gr=C3=A4=C3=9Flin?= Date: Thu, 20 Apr 2017 07:11:47 +0200 Subject: [PATCH] [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 --- .../x11/standalone/xinputintegration.cpp | 18 ------------------ 1 file changed, 18 deletions(-) diff --git a/plugins/platforms/x11/standalone/xinputintegration.cpp b/plugins/platforms/x11/standalone/xinputintegration.cpp index 67cac69dcb..66ec1d84d4 100644 --- a/plugins/platforms/x11/standalone/xinputintegration.cpp +++ b/plugins/platforms/x11/standalone/xinputintegration.cpp @@ -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());