summaryrefslogtreecommitdiffstats
path: root/examples/wayland
diff options
context:
space:
mode:
Diffstat (limited to 'examples/wayland')
-rw-r--r--examples/wayland/minimal-qml/main.qml1
-rw-r--r--examples/wayland/pure-qml/qml/Chrome.qml1
-rw-r--r--examples/wayland/pure-qml/qml/main.qml18
3 files changed, 4 insertions, 16 deletions
diff --git a/examples/wayland/minimal-qml/main.qml b/examples/wayland/minimal-qml/main.qml
index 0f0ca61bc..85c8c5783 100644
--- a/examples/wayland/minimal-qml/main.qml
+++ b/examples/wayland/minimal-qml/main.qml
@@ -67,6 +67,7 @@ WaylandCompositor {
// resize/move, and forwarding of mouse and keyboard
// events to the client process.
ShellSurfaceItem {
+ autoCreatePopupItems: true
shellSurface: modelData
onSurfaceDestroyed: shellSurfaces.remove(index)
}
diff --git a/examples/wayland/pure-qml/qml/Chrome.qml b/examples/wayland/pure-qml/qml/Chrome.qml
index e6fe97476..2e2586c1b 100644
--- a/examples/wayland/pure-qml/qml/Chrome.qml
+++ b/examples/wayland/pure-qml/qml/Chrome.qml
@@ -53,6 +53,7 @@ import QtWayland.Compositor 1.0
ShellSurfaceItem {
id: rootChrome
+ autoCreatePopupItems: true
property bool isChild: parent.shellSurface !== undefined
diff --git a/examples/wayland/pure-qml/qml/main.qml b/examples/wayland/pure-qml/qml/main.qml
index 77ed3ecd9..7bf2a623c 100644
--- a/examples/wayland/pure-qml/qml/main.qml
+++ b/examples/wayland/pure-qml/qml/main.qml
@@ -83,29 +83,15 @@ WaylandCompositor {
}
}
- property variant viewsBySurface: ({})
-
XdgShellV5 {
onXdgSurfaceCreated: {
- var item = chromeComponent.createObject(defaultOutput.surfaceArea, { "shellSurface": xdgSurface } );
- viewsBySurface[xdgSurface.surface] = item;
- }
- onXdgPopupCreated: {
- var parentView = viewsBySurface[xdgPopup.parentSurface];
- var item = chromeComponent.createObject(parentView, { "shellSurface": xdgPopup } );
- viewsBySurface[xdgPopup.surface] = item;
+ chromeComponent.createObject(defaultOutput.surfaceArea, { "shellSurface": xdgSurface } );
}
}
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(parentView, { "shellSurface": xdgSurface } );
- viewsBySurface[xdgSurface.surface] = item;
+ chromeComponent.createObject(defaultOutput.surfaceArea, { "shellSurface": xdgSurface } );
}
}