summaryrefslogtreecommitdiffstats
path: root/examples/wayland/pure-qml
diff options
context:
space:
mode:
authorPaul Olav Tvete <paul.tvete@qt.io>2016-11-16 14:45:43 +0100
committerPaul Olav Tvete <paul.tvete@qt.io>2016-11-17 11:05:11 +0000
commita8a7e28708a5c0741c013247cd3f3dc985d0fb57 (patch)
treefe946b03db5e0e7242a959eda82d8a4a2e20b803 /examples/wayland/pure-qml
parent5994c093e430161155d77be3af1ab4128a3fb54e (diff)
Fix crash with nested xdg popups
Popups that are children of popups would get a null parent in pure-qml. This would cause a crash in XdgPopupV5Integration. This change fixes pure-qml to set the parent correctly, and also adds null pointer checks to XdgPopupV5Integration. Change-Id: Ica5bd6c1a0853fbec1b30bc6ffff806b2cfd15f8 Reviewed-by: Johan Helsing <johan.helsing@qt.io>
Diffstat (limited to 'examples/wayland/pure-qml')
-rw-r--r--examples/wayland/pure-qml/qml/main.qml3
1 files changed, 2 insertions, 1 deletions
diff --git a/examples/wayland/pure-qml/qml/main.qml b/examples/wayland/pure-qml/qml/main.qml
index 9bce7bcb8..5eece078b 100644
--- a/examples/wayland/pure-qml/qml/main.qml
+++ b/examples/wayland/pure-qml/qml/main.qml
@@ -81,7 +81,8 @@ WaylandCompositor {
}
onXdgPopupCreated: {
var parentView = viewsBySurface[xdgPopup.parentSurface];
- chromeComponent.createObject(parentView, { "shellSurface": xdgPopup } );
+ var item = chromeComponent.createObject(parentView, { "shellSurface": xdgPopup } );
+ viewsBySurface[xdgPopup.surface] = item;
}
}