summaryrefslogtreecommitdiffstats
path: root/examples
diff options
context:
space:
mode:
authorJohan Klokkhammer Helsing <johan.helsing@qt.io>2016-12-01 18:00:05 +0100
committerJohan Helsing <johan.helsing@qt.io>2017-07-21 12:17:53 +0000
commite459125d971d1a0c548a63a1286cb839936a8772 (patch)
tree98b1486aaaea0765b8252d4eb0687c6bbb65c257 /examples
parenta9e10e2a7478bf3c68426a60fcc1862e6bd9f791 (diff)
Compositor: Add support for xdg-shell-unstable-v6
This adds QML and C++ support for xdg-shell-unstable v6 on the compositor side. A couple of things are still missing for complete support, but can be added implemented later without breaking the API. Task-number: QTBUG-56174 Change-Id: I08d7c05aa4f40f00377d92f2519d89ab416daaf4 Reviewed-by: Paul Olav Tvete <paul.tvete@qt.io>
Diffstat (limited to 'examples')
-rw-r--r--examples/wayland/pure-qml/qml/main.qml18
1 files changed, 16 insertions, 2 deletions
diff --git a/examples/wayland/pure-qml/qml/main.qml b/examples/wayland/pure-qml/qml/main.qml
index 6ee450d43..9ed4acd24 100644
--- a/examples/wayland/pure-qml/qml/main.qml
+++ b/examples/wayland/pure-qml/qml/main.qml
@@ -49,7 +49,7 @@
****************************************************************************/
import QtQuick 2.0
-import QtWayland.Compositor 1.0
+import QtWayland.Compositor 1.1
WaylandCompositor {
id: comp
@@ -83,8 +83,9 @@ WaylandCompositor {
}
}
+ property variant viewsBySurface: ({})
+
XdgShellV5 {
- property variant viewsBySurface: ({})
onXdgSurfaceCreated: {
var item = chromeComponent.createObject(defaultOutput.surfaceArea, { "shellSurface": xdgSurface } );
viewsBySurface[xdgSurface.surface] = item;
@@ -96,6 +97,19 @@ WaylandCompositor {
}
}
+ XdgShellV6 {
+ onToplevelCreated: {
+ var item = chromeComponent.createObject(defaultOutput.surfaceArea, { "shellSurface": xdgSurface } );
+ viewsBySurface[xdgSurface.surface] = item;
+ }
+ onPopupCreated: {
+ var parentView = viewsBySurface[popup.parentXdgSurface.surface];
+ var item = chromeComponent.createObject(defaultOutput.surfaceArea, { "shellSurface": xdgSurface } );
+ viewsBySurface[xdgSurface.surface] = item;
+ //TODO: set popup position
+ }
+ }
+
TextInputManager {
}