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>
This commit is contained in:
David Edmundson 2022-12-07 11:50:37 +00:00
parent cb71234bc9
commit be98a978e0

View File

@ -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)) {