diff options
author | David Edmundson <davidedmundson@kde.org> | 2018-06-26 18:45:30 +0100 |
---|---|---|
committer | Johan Helsing <johan.helsing@qt.io> | 2018-08-03 11:28:51 +0000 |
commit | f4527f1581486b99d2699b2675ad5d258bc8a7fc (patch) | |
tree | 80991cc655d51764c6459490ca2ed5f2d05b41da /src/client/qwaylanddisplay.cpp | |
parent | 48831347bcdc5e30138db6a6f4d705813afd0cea (diff) |
Add XdgOutput client support
XdgOutput is an extension of wl_output with the benefit of having the
logical size of a screen as an explicit parameter, instead of clients
inferring it from modeSize / scale. This is useful as it allows
compositors to implement fractional scaling whilst clients can still
fill the screen.
In the future XdgOutputV2 will support a more useful name and ID that
we can use.
[ChangeLog][QPA plugin] Added support for xdg-output-unstable-v1
Change-Id: I2e1e64ad6cb497a1cbb7b7b170f28ac92231c2c4
Reviewed-by: Pier Luigi Fiorini <pierluigi.fiorini@liri.io>
Reviewed-by: Johan Helsing <johan.helsing@qt.io>
Diffstat (limited to 'src/client/qwaylanddisplay.cpp')
-rw-r--r-- | src/client/qwaylanddisplay.cpp | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/src/client/qwaylanddisplay.cpp b/src/client/qwaylanddisplay.cpp index 03e4e3a2c..40ceafd96 100644 --- a/src/client/qwaylanddisplay.cpp +++ b/src/client/qwaylanddisplay.cpp @@ -276,6 +276,11 @@ void QWaylandDisplay::registry_global(uint32_t id, const QString &interface, uin // make a roundtrip here since we need to receive the events sent by // qt_hardware_integration before creating windows forceRoundTrip(); + } else if (interface == QLatin1String("zxdg_output_manager_v1")) { + mXdgOutputManager.reset(new QtWayland::zxdg_output_manager_v1(registry, id, 1)); + for (auto *screen : qAsConst(mScreens)) + screen->initXdgOutput(xdgOutputManager()); + forceRoundTrip(); } mGlobals.append(RegistryGlobal(id, interface, version, registry)); |