summaryrefslogtreecommitdiffstats
path: root/src/plugins/platforms/xcb/qxcbconnection.cpp
diff options
context:
space:
mode:
authorLiang Qi <liang.qi@qt.io>2021-05-26 11:23:29 +0200
committerLiang Qi <liang.qi@qt.io>2021-06-16 15:53:22 +0200
commit50a4b97d3160d45a5dcadc68d08f04b2e9efa16d (patch)
tree2718c2d64070053f8c81245f01ee661ebc60b3be /src/plugins/platforms/xcb/qxcbconnection.cpp
parent8e506fdd299d2fa18172209bea316f484e234e19 (diff)
xcb: fix QWindow::startSystemMove()/Resize() triggered by touch
Abort the system move/resise at XCB_INPUT_TOUCH_END. Limit the behavior only on supported platforms, such as KDE and OpenBox. Change-Id: I53c86979ca56f4de8c5cf2807f781abdad6987b2 Reviewed-by: Shawn Rutledge <shawn.rutledge@qt.io>
Diffstat (limited to 'src/plugins/platforms/xcb/qxcbconnection.cpp')
-rw-r--r--src/plugins/platforms/xcb/qxcbconnection.cpp11
1 files changed, 9 insertions, 2 deletions
diff --git a/src/plugins/platforms/xcb/qxcbconnection.cpp b/src/plugins/platforms/xcb/qxcbconnection.cpp
index 58a4a8ea04..e1c9bf80fc 100644
--- a/src/plugins/platforms/xcb/qxcbconnection.cpp
+++ b/src/plugins/platforms/xcb/qxcbconnection.cpp
@@ -96,8 +96,6 @@ QXcbConnection::QXcbConnection(QXcbNativeInterface *nativeInterface, bool canGra
m_eventQueue = new QXcbEventQueue(this);
- m_xdgCurrentDesktop = qgetenv("XDG_CURRENT_DESKTOP").toLower();
-
if (hasXRandr())
xrandrSelectEvents();
@@ -795,6 +793,15 @@ void QXcbConnection::ungrabServer()
xcb_ungrab_server(xcb_connection());
}
+QString QXcbConnection::windowManagerName() const
+{
+ QXcbVirtualDesktop *pvd = primaryVirtualDesktop();
+ if (pvd)
+ return pvd->windowManagerName().toLower();
+
+ return QString();
+}
+
xcb_timestamp_t QXcbConnection::getTimestamp()
{
// send a dummy event to myself to get the timestamp from X server.