summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorQt Forward Merge Bot <qt_forward_merge_bot@qt-project.org>2019-04-06 03:03:14 +0200
committerQt Forward Merge Bot <qt_forward_merge_bot@qt-project.org>2019-04-06 03:03:14 +0200
commit8fb8627fffb12ccf25a9b97a4d6f4cfdd83ea714 (patch)
treeaac5805ed02dec6ba63881b9db8cb4feea36d80b
parent7a69fc27a7cb5c5e9c70c1c56e534e6e59b46696 (diff)
parentd65783c9e1f40e176943b8706bf6bbed8320bcc8 (diff)
Merge remote-tracking branch 'origin/5.12' into 5.13
-rw-r--r--src/compositor/extensions/qwaylandshell.h4
-rw-r--r--src/compositor/extensions/qwaylandwlshell_p.h3
-rw-r--r--src/compositor/extensions/qwaylandxdgshell_p.h3
-rw-r--r--src/compositor/extensions/qwaylandxdgshellv5_p.h3
-rw-r--r--src/compositor/extensions/qwaylandxdgshellv6_p.h3
-rw-r--r--src/plugins/shellintegration/xdg-shell-v5/qwaylandxdgshellv5.cpp3
-rw-r--r--src/plugins/shellintegration/xdg-shell-v5/qwaylandxdgshellv5integration.cpp13
7 files changed, 22 insertions, 10 deletions
diff --git a/src/compositor/extensions/qwaylandshell.h b/src/compositor/extensions/qwaylandshell.h
index a86938214..9241b8662 100644
--- a/src/compositor/extensions/qwaylandshell.h
+++ b/src/compositor/extensions/qwaylandshell.h
@@ -96,11 +96,11 @@ public:
}
protected:
- QWaylandShellTemplate(QWaylandCompositorExtensionPrivate &dd)
+ QWaylandShellTemplate(QWaylandShellPrivate &dd)
: QWaylandShell(dd)
{ }
- QWaylandShellTemplate(QWaylandObject *container, QWaylandCompositorExtensionPrivate &dd)
+ QWaylandShellTemplate(QWaylandObject *container, QWaylandShellPrivate &dd)
: QWaylandShell(container,dd)
{ }
};
diff --git a/src/compositor/extensions/qwaylandwlshell_p.h b/src/compositor/extensions/qwaylandwlshell_p.h
index f8a29bac8..dbf6e794f 100644
--- a/src/compositor/extensions/qwaylandwlshell_p.h
+++ b/src/compositor/extensions/qwaylandwlshell_p.h
@@ -43,6 +43,7 @@
#include <QtWaylandCompositor/qtwaylandcompositorglobal.h>
#include <QtWaylandCompositor/qwaylandsurface.h>
#include <QtWaylandCompositor/private/qwaylandcompositorextension_p.h>
+#include <QtWaylandCompositor/private/qwaylandshell_p.h>
#include <QtWaylandCompositor/QWaylandWlShellSurface>
#include <QtWaylandCompositor/QWaylandSeat>
@@ -67,7 +68,7 @@
QT_BEGIN_NAMESPACE
class Q_WAYLAND_COMPOSITOR_EXPORT QWaylandWlShellPrivate
- : public QWaylandCompositorExtensionPrivate
+ : public QWaylandShellPrivate
, public QtWaylandServer::wl_shell
{
Q_DECLARE_PUBLIC(QWaylandWlShell)
diff --git a/src/compositor/extensions/qwaylandxdgshell_p.h b/src/compositor/extensions/qwaylandxdgshell_p.h
index 9d1140fbd..3223abf3a 100644
--- a/src/compositor/extensions/qwaylandxdgshell_p.h
+++ b/src/compositor/extensions/qwaylandxdgshell_p.h
@@ -38,6 +38,7 @@
#define QWAYLANDXDGSHELL_P_H
#include <QtWaylandCompositor/private/qwaylandcompositorextension_p.h>
+#include <QtWaylandCompositor/private/qwaylandshell_p.h>
#include <QtWaylandCompositor/private/qwayland-server-xdg-shell.h>
#include <QtWaylandCompositor/QWaylandXdgShell>
@@ -73,7 +74,7 @@ struct Q_WAYLAND_COMPOSITOR_EXPORT QWaylandXdgPositionerData {
};
class Q_WAYLAND_COMPOSITOR_EXPORT QWaylandXdgShellPrivate
- : public QWaylandCompositorExtensionPrivate
+ : public QWaylandShellPrivate
, public QtWaylandServer::xdg_wm_base
{
Q_DECLARE_PUBLIC(QWaylandXdgShell)
diff --git a/src/compositor/extensions/qwaylandxdgshellv5_p.h b/src/compositor/extensions/qwaylandxdgshellv5_p.h
index 681c4537b..8f5af746b 100644
--- a/src/compositor/extensions/qwaylandxdgshellv5_p.h
+++ b/src/compositor/extensions/qwaylandxdgshellv5_p.h
@@ -41,6 +41,7 @@
#define QWAYLANDXDGSHELLV5_P_H
#include <QtWaylandCompositor/private/qwaylandcompositorextension_p.h>
+#include <QtWaylandCompositor/private/qwaylandshell_p.h>
#include <QtWaylandCompositor/private/qwayland-server-xdg-shell-unstable-v5_p.h>
#include <QtWaylandCompositor/QWaylandXdgShellV5>
@@ -61,7 +62,7 @@
QT_BEGIN_NAMESPACE
class Q_WAYLAND_COMPOSITOR_EXPORT QWaylandXdgShellV5Private
- : public QWaylandCompositorExtensionPrivate
+ : public QWaylandShellPrivate
, public QtWaylandServer::xdg_shell_v5
{
Q_DECLARE_PUBLIC(QWaylandXdgShellV5)
diff --git a/src/compositor/extensions/qwaylandxdgshellv6_p.h b/src/compositor/extensions/qwaylandxdgshellv6_p.h
index adc25cb71..457bc2201 100644
--- a/src/compositor/extensions/qwaylandxdgshellv6_p.h
+++ b/src/compositor/extensions/qwaylandxdgshellv6_p.h
@@ -38,6 +38,7 @@
#define QWAYLANDXDGSHELLV6_P_H
#include <QtWaylandCompositor/private/qwaylandcompositorextension_p.h>
+#include <QtWaylandCompositor/private/qwaylandshell_p.h>
#include <QtWaylandCompositor/private/qwayland-server-xdg-shell-unstable-v6.h>
#include <QtWaylandCompositor/QWaylandXdgShellV6>
@@ -71,7 +72,7 @@ struct Q_WAYLAND_COMPOSITOR_EXPORT QWaylandXdgPositionerV6Data {
};
class Q_WAYLAND_COMPOSITOR_EXPORT QWaylandXdgShellV6Private
- : public QWaylandCompositorExtensionPrivate
+ : public QWaylandShellPrivate
, public QtWaylandServer::zxdg_shell_v6
{
Q_DECLARE_PUBLIC(QWaylandXdgShellV6)
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) {