diff options
author | Liang Qi <liang.qi@qt.io> | 2017-08-17 10:48:22 +0200 |
---|---|---|
committer | Liang Qi <liang.qi@qt.io> | 2017-08-17 10:48:28 +0200 |
commit | e99dae74353e5652794d7bcbcd3d79b1478debbc (patch) | |
tree | 6d0ab88f8aa6f464e66429899418f1adf63b0651 /src/client/qwaylandxdgshellv6.cpp | |
parent | e3feecfd96d8fcd65556d325c806153a3495d5b3 (diff) | |
parent | 7f70da6a644bc5b690066f0ab4814e1358f57e81 (diff) |
Merge remote-tracking branch 'origin/5.9' into dev
Conflicts:
.qmake.conf
Change-Id: Ia0f9d099e92a40cae7ec506781f70c56415bcf89
Diffstat (limited to 'src/client/qwaylandxdgshellv6.cpp')
-rw-r--r-- | src/client/qwaylandxdgshellv6.cpp | 10 |
1 files changed, 6 insertions, 4 deletions
diff --git a/src/client/qwaylandxdgshellv6.cpp b/src/client/qwaylandxdgshellv6.cpp index 947940213..cd81778c7 100644 --- a/src/client/qwaylandxdgshellv6.cpp +++ b/src/client/qwaylandxdgshellv6.cpp @@ -163,8 +163,8 @@ void QWaylandXdgSurfaceV6::setAppId(const QString &appId) void QWaylandXdgSurfaceV6::setType(Qt::WindowType type, QWaylandWindow *transientParent) { - if (type == Qt::Popup && transientParent) { - setPopup(transientParent, m_window->display()->lastInputDevice(), m_window->display()->lastInputSerial()); + if ((type == Qt::Popup || type == Qt::ToolTip) && transientParent) { + setPopup(transientParent, m_window->display()->lastInputDevice(), m_window->display()->lastInputSerial(), type == Qt::Popup); } else { setToplevel(); if (transientParent) { @@ -189,7 +189,7 @@ void QWaylandXdgSurfaceV6::setToplevel() m_toplevel = new Toplevel(this); } -void QWaylandXdgSurfaceV6::setPopup(QWaylandWindow *parent, QWaylandInputDevice *device, int serial) +void QWaylandXdgSurfaceV6::setPopup(QWaylandWindow *parent, QWaylandInputDevice *device, int serial, bool grab) { Q_ASSERT(!m_toplevel && !m_popup); @@ -209,7 +209,9 @@ void QWaylandXdgSurfaceV6::setPopup(QWaylandWindow *parent, QWaylandInputDevice m_popup = new Popup(this, parentXdgSurface, positioner); positioner->destroy(); delete positioner; - m_popup->grab(device->wl_seat(), serial); + if (grab) { + m_popup->grab(device->wl_seat(), serial); + } } void QWaylandXdgSurfaceV6::zxdg_surface_v6_configure(uint32_t serial) |