summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDavid Edmundson <davidedmundson@kde.org>2022-12-07 11:50:37 +0000
committerDavid Edmundson <davidedmundson@kde.org>2023-03-02 13:42:23 +0000
commitcf07a7fd913d5a245d92254205b455fb27b8e3f3 (patch)
tree84ea56c8d4fa665dd61e85561e397f29f2e89dd0
parent12121ac61c90082142222c47738dabe90984c568 (diff)
downloadqtwayland-cf07a7fd913d5a245d92254205b455fb27b8e3f3.tar.gz
Client: Allow runtime disabling of interfaces for debugging purposes
When running it's useful to confirm things work correctly in various configurations. In particular testing how things behave without server side decorations is important on all changes. It's easier to make the client pretend the compositor didn't send anything than change the compositor every time. This also potentially makes unit tests simpler than having to change the mock compositor setup. Change-Id: Ide897d918384389009aa38c7030d5ac30fc837a6 Reviewed-by: Eskil Abrahamsen Blomfeldt <eskil.abrahamsen-blomfeldt@qt.io>
-rw-r--r--src/client/qwaylanddisplay.cpp5
1 files changed, 5 insertions, 0 deletions
diff --git a/src/client/qwaylanddisplay.cpp b/src/client/qwaylanddisplay.cpp
index 2bf09331..46c85a6a 100644
--- a/src/client/qwaylanddisplay.cpp
+++ b/src/client/qwaylanddisplay.cpp
@@ -492,6 +492,11 @@ void QWaylandDisplay::registry_global(uint32_t id, const QString &interface, uin
{
struct ::wl_registry *registry = object();
+ static QByteArrayList interfaceBlacklist = qgetenv("QT_WAYLAND_DISABLED_INTERFACES").split(',');
+ if (interfaceBlacklist.contains(interface)) {
+ return;
+ }
+
if (interface == QLatin1String(QtWayland::wl_output::interface()->name)) {
mWaitingScreens << mWaylandIntegration->createPlatformScreen(this, version, id);
} else if (interface == QLatin1String(QtWayland::wl_compositor::interface()->name)) {