diff options
author | Liang Qi <liang.qi@qt.io> | 2019-04-10 11:38:16 +0200 |
---|---|---|
committer | Liang Qi <liang.qi@qt.io> | 2019-04-10 11:38:16 +0200 |
commit | 12b0570a1739e0e6947a40cab24816a0bad17f7a (patch) | |
tree | c9a8aaf212b71c9e811bf9c38225269c2ad69196 /src/plugins | |
parent | 0dee89272cbd05454ed3c527b5e50e5acee1ba39 (diff) | |
parent | 0b10284a3589b37a9d639f3d1af4b1d641fbb6ab (diff) |
Merge remote-tracking branch 'origin/5.13' into dev
Conflicts:
src/hardwareintegration/client/wayland-egl/qwaylandglcontext.cpp
src/plugins/shellintegration/xdg-shell-v5/qwaylandxdgshellv5.cpp
Done-with: Johan Klokkhammer Helsing <johan.helsing@qt.io>
Change-Id: Ia6fa28454f681b4965b5e18f635cb8c40da316f3
Diffstat (limited to 'src/plugins')
-rw-r--r-- | src/plugins/shellintegration/xdg-shell-v5/qwaylandxdgshellv5.cpp | 3 | ||||
-rw-r--r-- | src/plugins/shellintegration/xdg-shell-v5/qwaylandxdgshellv5integration.cpp | 13 |
2 files changed, 12 insertions, 4 deletions
diff --git a/src/plugins/shellintegration/xdg-shell-v5/qwaylandxdgshellv5.cpp b/src/plugins/shellintegration/xdg-shell-v5/qwaylandxdgshellv5.cpp index fa9d0d8cf..7e242c4a5 100644 --- a/src/plugins/shellintegration/xdg-shell-v5/qwaylandxdgshellv5.cpp +++ b/src/plugins/shellintegration/xdg-shell-v5/qwaylandxdgshellv5.cpp @@ -71,6 +71,9 @@ QWaylandXdgSurfaceV5 *QWaylandXdgShellV5::createXdgSurface(QWaylandWindow *windo QWaylandXdgPopupV5 *QWaylandXdgShellV5::createXdgPopup(QWaylandWindow *window, QWaylandInputDevice *inputDevice) { QWaylandWindow *parentWindow = m_popups.empty() ? window->transientParent() : m_popups.last(); + if (!parentWindow) + return nullptr; + ::wl_surface *parentSurface = parentWindow->wlSurface(); if (m_popupSerial == 0) diff --git a/src/plugins/shellintegration/xdg-shell-v5/qwaylandxdgshellv5integration.cpp b/src/plugins/shellintegration/xdg-shell-v5/qwaylandxdgshellv5integration.cpp index 12cc95b15..410f27001 100644 --- a/src/plugins/shellintegration/xdg-shell-v5/qwaylandxdgshellv5integration.cpp +++ b/src/plugins/shellintegration/xdg-shell-v5/qwaylandxdgshellv5integration.cpp @@ -73,10 +73,15 @@ bool QWaylandXdgShellV5Integration::initialize(QWaylandDisplay *display) QWaylandShellSurface *QWaylandXdgShellV5Integration::createShellSurface(QWaylandWindow *window) { QWaylandInputDevice *inputDevice = window->display()->lastInputDevice(); - if (window->window()->type() == Qt::WindowType::Popup && inputDevice) - return m_xdgShell->createXdgPopup(window, inputDevice); - else - return m_xdgShell->createXdgSurface(window); + if (window->window()->type() == Qt::WindowType::Popup && inputDevice) { + if (auto *popup = m_xdgShell->createXdgPopup(window, inputDevice)) + return popup; + + qWarning(lcQpaWayland) << "Failed to create xdg-popup v5 for window" << window->window() + << "falling back to creating an xdg-surface"; + } + + return m_xdgShell->createXdgSurface(window); } void QWaylandXdgShellV5Integration::handleKeyboardFocusChanged(QWaylandWindow *newFocus, QWaylandWindow *oldFocus) { |