diff options
author | Paul Olav Tvete <paul.tvete@qt.io> | 2017-10-25 14:06:54 +0200 |
---|---|---|
committer | Paul Olav Tvete <paul.tvete@qt.io> | 2017-10-25 14:06:54 +0200 |
commit | 523cf490b4c46916c6f5253c666a492f5cce2aad (patch) | |
tree | b4514f338b143ab430fe2b91ec7699cb176a147e /src/client/qwaylandwlshellsurface.cpp | |
parent | 8e3c71b2d1ec37222bf1648aa23eb033062b4ea6 (diff) | |
parent | f1407493d6d25f24a3c71fbcedc00598baa44b56 (diff) |
Merge remote-tracking branch 'qt/5.9' into 5.10v5.10.0-beta3
Change-Id: I6c283081669594b3e8c6b30194bb96e389319cb2
Diffstat (limited to 'src/client/qwaylandwlshellsurface.cpp')
-rw-r--r-- | src/client/qwaylandwlshellsurface.cpp | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/src/client/qwaylandwlshellsurface.cpp b/src/client/qwaylandwlshellsurface.cpp index 77434e98b..92223f45e 100644 --- a/src/client/qwaylandwlshellsurface.cpp +++ b/src/client/qwaylandwlshellsurface.cpp @@ -185,6 +185,7 @@ void QWaylandWlShellSurface::updateTransientParent(QWindow *parent) || testShowWithoutActivating(m_window->window())) flags |= WL_SHELL_SURFACE_TRANSIENT_INACTIVE; + Q_ASSERT(parent_wayland_window->object()); set_transient(parent_wayland_window->object(), transientPos.x(), transientPos.y(), @@ -211,15 +212,16 @@ void QWaylandWlShellSurface::setPopup(QWaylandWindow *parent, QWaylandInputDevic transientPos.setY(transientPos.y() + parent_wayland_window->decoration()->margins().top()); } + Q_ASSERT(parent_wayland_window->object()); set_popup(device->wl_seat(), serial, parent_wayland_window->object(), transientPos.x(), transientPos.y(), 0); } void QWaylandWlShellSurface::setType(Qt::WindowType type, QWaylandWindow *transientParent) { - if (type == Qt::Popup && transientParent) + if (type == Qt::Popup && transientParent && transientParent->object()) setPopup(transientParent, m_window->display()->lastInputDevice(), m_window->display()->lastInputSerial()); - else if (transientParent) + else if (transientParent && transientParent->object()) updateTransientParent(transientParent->window()); else setTopLevel(); |