summaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorGabriel de Dietrich <gabriel.dedietrich@theqtcompany.com>2016-03-02 14:42:34 -0800
committerShawn Rutledge <shawn.rutledge@theqtcompany.com>2016-03-04 09:37:23 +0000
commit5a56bf4104fb156ce929fc917c2941d8aac0bd46 (patch)
tree8036e06a212718c366be896d44bb8a94d3170ae6 /src
parent089ed1525e80b804a1745484995582e29d08129e (diff)
QXcbNativeIntegration: Add query for compositing enabled
Task-number: QTBUG-41195 Change-Id: I4f37c82f6757283ed58b38c7fd47849fb4810bce Reviewed-by: Błażej Szczygieł <spaz16@wp.pl> Reviewed-by: Shawn Rutledge <shawn.rutledge@theqtcompany.com>
Diffstat (limited to 'src')
-rw-r--r--src/plugins/platforms/xcb/qxcbnativeinterface.cpp7
-rw-r--r--src/plugins/platforms/xcb/qxcbnativeinterface.h3
2 files changed, 8 insertions, 2 deletions
diff --git a/src/plugins/platforms/xcb/qxcbnativeinterface.cpp b/src/plugins/platforms/xcb/qxcbnativeinterface.cpp
index 189053c5bf..eb7c5d2b02 100644
--- a/src/plugins/platforms/xcb/qxcbnativeinterface.cpp
+++ b/src/plugins/platforms/xcb/qxcbnativeinterface.cpp
@@ -85,7 +85,8 @@ static int resourceType(const QByteArray &key)
QByteArrayLiteral("rootwindow"),
QByteArrayLiteral("subpixeltype"), QByteArrayLiteral("antialiasingEnabled"),
QByteArrayLiteral("nofonthinting"),
- QByteArrayLiteral("atspibus")
+ QByteArrayLiteral("atspibus"),
+ QByteArrayLiteral("compositingenabled")
};
const QByteArray *end = names + sizeof(names) / sizeof(names[0]);
const QByteArray *result = std::find(names, end, key);
@@ -246,6 +247,10 @@ void *QXcbNativeInterface::nativeResourceForScreen(const QByteArray &resourceStr
case RootWindow:
result = reinterpret_cast<void *>(xcbScreen->root());
break;
+ case CompositingEnabled:
+ if (QXcbVirtualDesktop *vd = xcbScreen->virtualDesktop())
+ result = vd->compositingActive() ? this : Q_NULLPTR;
+ break;
default:
break;
}
diff --git a/src/plugins/platforms/xcb/qxcbnativeinterface.h b/src/plugins/platforms/xcb/qxcbnativeinterface.h
index a3e188195f..ba19cd869c 100644
--- a/src/plugins/platforms/xcb/qxcbnativeinterface.h
+++ b/src/plugins/platforms/xcb/qxcbnativeinterface.h
@@ -74,7 +74,8 @@ public:
ScreenSubpixelType,
ScreenAntialiasingEnabled,
NoFontHinting,
- AtspiBus
+ AtspiBus,
+ CompositingEnabled
};
QXcbNativeInterface();