diff options
author | Qt Forward Merge Bot <qt_forward_merge_bot@qt-project.org> | 2019-04-06 03:03:14 +0200 |
---|---|---|
committer | Qt Forward Merge Bot <qt_forward_merge_bot@qt-project.org> | 2019-04-06 03:03:14 +0200 |
commit | 8fb8627fffb12ccf25a9b97a4d6f4cfdd83ea714 (patch) | |
tree | aac5805ed02dec6ba63881b9db8cb4feea36d80b /src/plugins | |
parent | 7a69fc27a7cb5c5e9c70c1c56e534e6e59b46696 (diff) | |
parent | d65783c9e1f40e176943b8706bf6bbed8320bcc8 (diff) |
Merge remote-tracking branch 'origin/5.12' into 5.13
Change-Id: I16bc2e214dda4c8d6c9fc3568af60068815fc558
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 4cbafbd71..3eda43d7c 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->object(); 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) { |