diff options
Diffstat (limited to 'examples')
6 files changed, 18 insertions, 0 deletions
diff --git a/examples/wayland/multi-output/doc/src/multi-output.qdoc b/examples/wayland/multi-output/doc/src/multi-output.qdoc index 233b29ba3..e57ffd024 100644 --- a/examples/wayland/multi-output/doc/src/multi-output.qdoc +++ b/examples/wayland/multi-output/doc/src/multi-output.qdoc @@ -38,4 +38,8 @@ WaylandSurface is displayed in a GridView on one of the outputs, while a ShellSurface associated with the WaylandSurface is displayed with desktop-style composition on the other output. + + \note In order to support multiple Wayland outputs in the same compositor, the + \l Qt::AA_ShareOpenGLContexts attribute must be set before the \l QGuiApplication + object is constructed. */ diff --git a/examples/wayland/multi-output/main.cpp b/examples/wayland/multi-output/main.cpp index 304b13c4a..1edb18c34 100644 --- a/examples/wayland/multi-output/main.cpp +++ b/examples/wayland/multi-output/main.cpp @@ -57,6 +57,8 @@ int main(int argc, char *argv[]) { + // AA_ShareOpenGLContexts is required for compositors with multiple outputs + QCoreApplication::setAttribute(Qt::AA_ShareOpenGLContexts, true); QGuiApplication app(argc, argv); QQmlApplicationEngine appEngine(QUrl("qrc:///qml/main.qml")); diff --git a/examples/wayland/multi-screen/doc/src/multi-screen.qdoc b/examples/wayland/multi-screen/doc/src/multi-screen.qdoc index cd60213b5..5e8e74557 100644 --- a/examples/wayland/multi-screen/doc/src/multi-screen.qdoc +++ b/examples/wayland/multi-screen/doc/src/multi-screen.qdoc @@ -42,4 +42,8 @@ * WaylandQuickItem::setPrimary() is called at appropriate times to set the * primary view for the ShellSurface, which is used when the client asks to be * maximized or fullscreen. + * + * \note In order to support multiple Wayland outputs in the same compositor, the + * \l Qt::AA_ShareOpenGLContexts attribute must be set before the \l QGuiApplication + * object is constructed. */ diff --git a/examples/wayland/multi-screen/main.cpp b/examples/wayland/multi-screen/main.cpp index 304b13c4a..1edb18c34 100644 --- a/examples/wayland/multi-screen/main.cpp +++ b/examples/wayland/multi-screen/main.cpp @@ -57,6 +57,8 @@ int main(int argc, char *argv[]) { + // AA_ShareOpenGLContexts is required for compositors with multiple outputs + QCoreApplication::setAttribute(Qt::AA_ShareOpenGLContexts, true); QGuiApplication app(argc, argv); QQmlApplicationEngine appEngine(QUrl("qrc:///qml/main.qml")); diff --git a/examples/wayland/spanning-screens/doc/src/spanning-screens.qdoc b/examples/wayland/spanning-screens/doc/src/spanning-screens.qdoc index 3ab0b91f5..2594a54c8 100644 --- a/examples/wayland/spanning-screens/doc/src/spanning-screens.qdoc +++ b/examples/wayland/spanning-screens/doc/src/spanning-screens.qdoc @@ -33,4 +33,8 @@ * * Spanning screens is a Wayland compositor example that maximizes clients * across a top and a bottom screen. + * + * \note In order to support multiple Wayland outputs in the same compositor, the + * \l Qt::AA_ShareOpenGLContexts attribute must be set before the \l QGuiApplication + * object is constructed. */ diff --git a/examples/wayland/spanning-screens/main.cpp b/examples/wayland/spanning-screens/main.cpp index 435b4e3f1..8efb6e04d 100644 --- a/examples/wayland/spanning-screens/main.cpp +++ b/examples/wayland/spanning-screens/main.cpp @@ -57,6 +57,8 @@ int main(int argc, char *argv[]) { + // AA_ShareOpenGLContexts is required for compositors with multiple outputs + QCoreApplication::setAttribute(Qt::AA_ShareOpenGLContexts, true); QGuiApplication app(argc, argv); QQmlApplicationEngine appEngine(QUrl("qrc:///main.qml")); |