summaryrefslogtreecommitdiffstats
path: root/src/plugins
diff options
context:
space:
mode:
Diffstat (limited to 'src/plugins')
-rw-r--r--src/plugins/decorations/bradient/main.cpp16
-rw-r--r--src/plugins/hardwareintegration/compositor/compositor.pro2
-rw-r--r--src/plugins/hardwareintegration/compositor/linux-dmabuf-unstable-v1/linux-dmabuf-unstable-v1.json3
-rw-r--r--src/plugins/hardwareintegration/compositor/linux-dmabuf-unstable-v1/linux-dmabuf-unstable-v1.pro12
-rw-r--r--src/plugins/hardwareintegration/compositor/linux-dmabuf-unstable-v1/main.cpp63
-rw-r--r--src/plugins/shellintegration/fullscreen-shell-v1/fullscreen-shell-v1.json3
-rw-r--r--src/plugins/shellintegration/fullscreen-shell-v1/fullscreen-shell-v1.pro23
-rw-r--r--src/plugins/shellintegration/fullscreen-shell-v1/main.cpp69
-rw-r--r--src/plugins/shellintegration/fullscreen-shell-v1/qwaylandfullscreenshellv1integration.cpp71
-rw-r--r--src/plugins/shellintegration/fullscreen-shell-v1/qwaylandfullscreenshellv1integration.h67
-rw-r--r--src/plugins/shellintegration/fullscreen-shell-v1/qwaylandfullscreenshellv1surface.cpp61
-rw-r--r--src/plugins/shellintegration/fullscreen-shell-v1/qwaylandfullscreenshellv1surface.h67
-rw-r--r--src/plugins/shellintegration/shellintegration.pro14
-rw-r--r--src/plugins/shellintegration/wl-shell/qwaylandwlshellintegration_p.h1
-rw-r--r--src/plugins/shellintegration/wl-shell/qwaylandwlshellsurface.cpp15
-rw-r--r--src/plugins/shellintegration/wl-shell/qwaylandwlshellsurface_p.h5
-rw-r--r--src/plugins/shellintegration/xdg-shell-v5/pregenerated/3rdparty/qwayland-xdg-shell-unstable-v5.cpp1
-rw-r--r--src/plugins/shellintegration/xdg-shell-v5/pregenerated/3rdparty/qwayland-xdg-shell-unstable-v5_p.h2
-rw-r--r--src/plugins/shellintegration/xdg-shell-v5/pregenerated/3rdparty/wayland-xdg-shell-unstable-v5-client-protocol_p.h2
-rw-r--r--src/plugins/shellintegration/xdg-shell-v5/qwaylandxdgpopupv5_p.h2
-rw-r--r--src/plugins/shellintegration/xdg-shell-v5/qwaylandxdgshellv5_p.h2
-rw-r--r--src/plugins/shellintegration/xdg-shell-v5/qwaylandxdgsurfacev5.cpp17
-rw-r--r--src/plugins/shellintegration/xdg-shell-v5/qwaylandxdgsurfacev5_p.h7
-rw-r--r--src/plugins/shellintegration/xdg-shell-v6/qwaylandxdgshellv6.cpp21
-rw-r--r--src/plugins/shellintegration/xdg-shell-v6/qwaylandxdgshellv6_p.h8
-rw-r--r--src/plugins/shellintegration/xdg-shell/qwaylandxdgshell.cpp21
-rw-r--r--src/plugins/shellintegration/xdg-shell/qwaylandxdgshell_p.h8
27 files changed, 516 insertions, 67 deletions
diff --git a/src/plugins/decorations/bradient/main.cpp b/src/plugins/decorations/bradient/main.cpp
index 3fa723446..83dc8604b 100644
--- a/src/plugins/decorations/bradient/main.cpp
+++ b/src/plugins/decorations/bradient/main.cpp
@@ -315,19 +315,19 @@ void QWaylandBradientDecoration::processMouseTop(QWaylandInputDevice *inputDevic
#if QT_CONFIG(cursor)
waylandWindow()->setMouseCursor(inputDevice, Qt::SizeFDiagCursor);
#endif
- startResize(inputDevice,WL_SHELL_SURFACE_RESIZE_TOP_LEFT,b);
+ startResize(inputDevice, Qt::TopEdge | Qt::LeftEdge, b);
} else if (local.x() > window()->width() + margins().left()) {
//top right bit
#if QT_CONFIG(cursor)
waylandWindow()->setMouseCursor(inputDevice, Qt::SizeBDiagCursor);
#endif
- startResize(inputDevice,WL_SHELL_SURFACE_RESIZE_TOP_RIGHT,b);
+ startResize(inputDevice, Qt::TopEdge | Qt::RightEdge, b);
} else {
//top resize bit
#if QT_CONFIG(cursor)
waylandWindow()->setMouseCursor(inputDevice, Qt::SplitVCursor);
#endif
- startResize(inputDevice,WL_SHELL_SURFACE_RESIZE_TOP,b);
+ startResize(inputDevice, Qt::TopEdge, b);
}
} else if (local.x() <= margins().left()) {
processMouseLeft(inputDevice, local, b, mods);
@@ -358,19 +358,19 @@ void QWaylandBradientDecoration::processMouseBottom(QWaylandInputDevice *inputDe
#if QT_CONFIG(cursor)
waylandWindow()->setMouseCursor(inputDevice, Qt::SizeBDiagCursor);
#endif
- startResize(inputDevice, WL_SHELL_SURFACE_RESIZE_BOTTOM_LEFT,b);
+ startResize(inputDevice, Qt::BottomEdge | Qt::LeftEdge, b);
} else if (local.x() > window()->width() + margins().left()) {
//bottom right bit
#if QT_CONFIG(cursor)
waylandWindow()->setMouseCursor(inputDevice, Qt::SizeFDiagCursor);
#endif
- startResize(inputDevice, WL_SHELL_SURFACE_RESIZE_BOTTOM_RIGHT,b);
+ startResize(inputDevice, Qt::BottomEdge | Qt::RightEdge, b);
} else {
//bottom bit
#if QT_CONFIG(cursor)
waylandWindow()->setMouseCursor(inputDevice, Qt::SplitVCursor);
#endif
- startResize(inputDevice,WL_SHELL_SURFACE_RESIZE_BOTTOM,b);
+ startResize(inputDevice, Qt::BottomEdge, b);
}
}
@@ -381,7 +381,7 @@ void QWaylandBradientDecoration::processMouseLeft(QWaylandInputDevice *inputDevi
#if QT_CONFIG(cursor)
waylandWindow()->setMouseCursor(inputDevice, Qt::SplitHCursor);
#endif
- startResize(inputDevice,WL_SHELL_SURFACE_RESIZE_LEFT,b);
+ startResize(inputDevice, Qt::LeftEdge, b);
}
void QWaylandBradientDecoration::processMouseRight(QWaylandInputDevice *inputDevice, const QPointF &local, Qt::MouseButtons b, Qt::KeyboardModifiers mods)
@@ -391,7 +391,7 @@ void QWaylandBradientDecoration::processMouseRight(QWaylandInputDevice *inputDev
#if QT_CONFIG(cursor)
waylandWindow()->setMouseCursor(inputDevice, Qt::SplitHCursor);
#endif
- startResize(inputDevice, WL_SHELL_SURFACE_RESIZE_RIGHT,b);
+ startResize(inputDevice, Qt::RightEdge, b);
}
class QWaylandBradientDecorationPlugin : public QWaylandDecorationPlugin
diff --git a/src/plugins/hardwareintegration/compositor/compositor.pro b/src/plugins/hardwareintegration/compositor/compositor.pro
index cd47b2676..94e0f8bf1 100644
--- a/src/plugins/hardwareintegration/compositor/compositor.pro
+++ b/src/plugins/hardwareintegration/compositor/compositor.pro
@@ -1,6 +1,8 @@
TEMPLATE = subdirs
QT_FOR_CONFIG += waylandcompositor-private
+qtConfig(wayland-dmabuf-client-buffer): \
+ SUBDIRS += linux-dmabuf-unstable-v1
qtConfig(wayland-egl): \
SUBDIRS += wayland-egl
qtConfig(wayland-brcm): \
diff --git a/src/plugins/hardwareintegration/compositor/linux-dmabuf-unstable-v1/linux-dmabuf-unstable-v1.json b/src/plugins/hardwareintegration/compositor/linux-dmabuf-unstable-v1/linux-dmabuf-unstable-v1.json
new file mode 100644
index 000000000..1fab86fef
--- /dev/null
+++ b/src/plugins/hardwareintegration/compositor/linux-dmabuf-unstable-v1/linux-dmabuf-unstable-v1.json
@@ -0,0 +1,3 @@
+{
+ "Keys": [ "linux-dmabuf-unstable-v1" ]
+}
diff --git a/src/plugins/hardwareintegration/compositor/linux-dmabuf-unstable-v1/linux-dmabuf-unstable-v1.pro b/src/plugins/hardwareintegration/compositor/linux-dmabuf-unstable-v1/linux-dmabuf-unstable-v1.pro
new file mode 100644
index 000000000..bc4311423
--- /dev/null
+++ b/src/plugins/hardwareintegration/compositor/linux-dmabuf-unstable-v1/linux-dmabuf-unstable-v1.pro
@@ -0,0 +1,12 @@
+QT = waylandcompositor waylandcompositor-private core-private gui-private
+
+OTHER_FILES += linux-dmabuf.json
+
+SOURCES += \
+ main.cpp \
+
+include(../../../../hardwareintegration/compositor/linux-dmabuf-unstable-v1/linux-dmabuf-unstable-v1.pri)
+
+PLUGIN_TYPE = wayland-graphics-integration-server
+PLUGIN_CLASS_NAME = QWaylandDmabufClientBufferIntegrationPlugin
+load(qt_plugin)
diff --git a/src/plugins/hardwareintegration/compositor/linux-dmabuf-unstable-v1/main.cpp b/src/plugins/hardwareintegration/compositor/linux-dmabuf-unstable-v1/main.cpp
new file mode 100644
index 000000000..d16268a2c
--- /dev/null
+++ b/src/plugins/hardwareintegration/compositor/linux-dmabuf-unstable-v1/main.cpp
@@ -0,0 +1,63 @@
+/****************************************************************************
+**
+** Copyright (C) 2018 The Qt Company Ltd.
+** Contact: https://www.qt.io/licensing/
+**
+** This file is part of the plugins of the Qt Toolkit.
+**
+** $QT_BEGIN_LICENSE:LGPL$
+** Commercial License Usage
+** Licensees holding valid commercial Qt licenses may use this file in
+** accordance with the commercial license agreement provided with the
+** Software or, alternatively, in accordance with the terms contained in
+** a written agreement between you and The Qt Company. For licensing terms
+** and conditions see https://www.qt.io/terms-conditions. For further
+** information use the contact form at https://www.qt.io/contact-us.
+**
+** GNU Lesser General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU Lesser
+** General Public License version 3 as published by the Free Software
+** Foundation and appearing in the file LICENSE.LGPL3 included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU Lesser General Public License version 3 requirements
+** will be met: https://www.gnu.org/licenses/lgpl-3.0.html.
+**
+** GNU General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU
+** General Public License version 2.0 or (at your option) the GNU General
+** Public license version 3 or any later version approved by the KDE Free
+** Qt Foundation. The licenses are as published by the Free Software
+** Foundation and appearing in the file LICENSE.GPL2 and LICENSE.GPL3
+** included in the packaging of this file. Please review the following
+** information to ensure the GNU General Public License requirements will
+** be met: https://www.gnu.org/licenses/gpl-2.0.html and
+** https://www.gnu.org/licenses/gpl-3.0.html.
+**
+** $QT_END_LICENSE$
+**
+****************************************************************************/
+
+#include <QtWaylandCompositor/private/qwlclientbufferintegrationfactory_p.h>
+#include <QtWaylandCompositor/private/qwlclientbufferintegrationplugin_p.h>
+#include "linuxdmabufclientbufferintegration.h"
+
+QT_BEGIN_NAMESPACE
+
+class QWaylandDmabufClientBufferIntegrationPlugin : public QtWayland::ClientBufferIntegrationPlugin
+{
+ Q_OBJECT
+ Q_PLUGIN_METADATA(IID QtWaylandClientBufferIntegrationFactoryInterface_iid FILE "linux-dmabuf-unstable-v1.json")
+public:
+ QtWayland::ClientBufferIntegration *create(const QString& key, const QStringList& paramList) override;
+};
+
+QtWayland::ClientBufferIntegration *QWaylandDmabufClientBufferIntegrationPlugin::create(const QString& key, const QStringList& paramList)
+{
+ Q_UNUSED(paramList);
+ Q_UNUSED(key);
+ return new LinuxDmabufClientBufferIntegration();
+}
+
+QT_END_NAMESPACE
+
+#include "main.moc"
diff --git a/src/plugins/shellintegration/fullscreen-shell-v1/fullscreen-shell-v1.json b/src/plugins/shellintegration/fullscreen-shell-v1/fullscreen-shell-v1.json
new file mode 100644
index 000000000..f32637bcc
--- /dev/null
+++ b/src/plugins/shellintegration/fullscreen-shell-v1/fullscreen-shell-v1.json
@@ -0,0 +1,3 @@
+{
+ "Keys": [ "fullscreen-shell-v1" ]
+}
diff --git a/src/plugins/shellintegration/fullscreen-shell-v1/fullscreen-shell-v1.pro b/src/plugins/shellintegration/fullscreen-shell-v1/fullscreen-shell-v1.pro
new file mode 100644
index 000000000..a522f87a8
--- /dev/null
+++ b/src/plugins/shellintegration/fullscreen-shell-v1/fullscreen-shell-v1.pro
@@ -0,0 +1,23 @@
+QT += gui-private waylandclient-private
+CONFIG += wayland-scanner
+
+QMAKE_USE += wayland-client
+
+WAYLANDCLIENTSOURCES += \
+ ../../../3rdparty/protocol/fullscreen-shell-unstable-v1.xml
+
+HEADERS += \
+ qwaylandfullscreenshellv1integration.h \
+ qwaylandfullscreenshellv1surface.h
+
+SOURCES += \
+ main.cpp \
+ qwaylandfullscreenshellv1integration.cpp \
+ qwaylandfullscreenshellv1surface.cpp
+
+OTHER_FILES += \
+ fullscreen-shell-v1.json
+
+PLUGIN_TYPE = wayland-shell-integration
+PLUGIN_CLASS_NAME = QWaylandFullScreenShellV1IntegrationPlugin
+load(qt_plugin)
diff --git a/src/plugins/shellintegration/fullscreen-shell-v1/main.cpp b/src/plugins/shellintegration/fullscreen-shell-v1/main.cpp
new file mode 100644
index 000000000..dfcd997da
--- /dev/null
+++ b/src/plugins/shellintegration/fullscreen-shell-v1/main.cpp
@@ -0,0 +1,69 @@
+/****************************************************************************
+**
+** Copyright (C) 2018 Pier Luigi Fiorini <pierluigi.fiorini@gmail.com>
+** Contact: http://www.qt-project.org/legal
+**
+** This file is part of the plugins of the Qt Toolkit.
+**
+** $QT_BEGIN_LICENSE:LGPL$
+** Commercial License Usage
+** Licensees holding valid commercial Qt licenses may use this file in
+** accordance with the commercial license agreement provided with the
+** Software or, alternatively, in accordance with the terms contained in
+** a written agreement between you and The Qt Company. For licensing terms
+** and conditions see https://www.qt.io/terms-conditions. For further
+** information use the contact form at https://www.qt.io/contact-us.
+**
+** GNU Lesser General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU Lesser
+** General Public License version 3 as published by the Free Software
+** Foundation and appearing in the file LICENSE.LGPL3 included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU Lesser General Public License version 3 requirements
+** will be met: https://www.gnu.org/licenses/lgpl-3.0.html.
+**
+** GNU General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU
+** General Public License version 2.0 or (at your option) the GNU General
+** Public license version 3 or any later version approved by the KDE Free
+** Qt Foundation. The licenses are as published by the Free Software
+** Foundation and appearing in the file LICENSE.GPL2 and LICENSE.GPL3
+** included in the packaging of this file. Please review the following
+** information to ensure the GNU General Public License requirements will
+** be met: https://www.gnu.org/licenses/gpl-2.0.html and
+** https://www.gnu.org/licenses/gpl-3.0.html.
+**
+** $QT_END_LICENSE$
+**
+****************************************************************************/
+
+#include <QtWaylandClient/private/qwaylandshellintegrationplugin_p.h>
+
+#include "qwaylandfullscreenshellv1integration.h"
+
+QT_BEGIN_NAMESPACE
+
+namespace QtWaylandClient {
+
+class QWaylandFullScreenShellV1IntegrationPlugin : public QWaylandShellIntegrationPlugin
+{
+ Q_OBJECT
+ Q_PLUGIN_METADATA(IID QWaylandShellIntegrationFactoryInterface_iid FILE "fullscreen-shell-v1.json")
+public:
+ QWaylandShellIntegration *create(const QString &key, const QStringList &paramList) override;
+};
+
+QWaylandShellIntegration *QWaylandFullScreenShellV1IntegrationPlugin::create(const QString &key, const QStringList &paramList)
+{
+ Q_UNUSED(paramList);
+
+ if (key == QLatin1String("fullscreen-shell-v1"))
+ return new QWaylandFullScreenShellV1Integration();
+ return nullptr;
+}
+
+} // namespace QtWaylandClient
+
+QT_END_NAMESPACE
+
+#include "main.moc"
diff --git a/src/plugins/shellintegration/fullscreen-shell-v1/qwaylandfullscreenshellv1integration.cpp b/src/plugins/shellintegration/fullscreen-shell-v1/qwaylandfullscreenshellv1integration.cpp
new file mode 100644
index 000000000..0cd2cb1e8
--- /dev/null
+++ b/src/plugins/shellintegration/fullscreen-shell-v1/qwaylandfullscreenshellv1integration.cpp
@@ -0,0 +1,71 @@
+/****************************************************************************
+**
+** Copyright (C) 2018 Pier Luigi Fiorini <pierluigi.fiorini@gmail.com>
+** Contact: http://www.qt-project.org/legal
+**
+** This file is part of the plugins of the Qt Toolkit.
+**
+** $QT_BEGIN_LICENSE:LGPL$
+** Commercial License Usage
+** Licensees holding valid commercial Qt licenses may use this file in
+** accordance with the commercial license agreement provided with the
+** Software or, alternatively, in accordance with the terms contained in
+** a written agreement between you and The Qt Company. For licensing terms
+** and conditions see https://www.qt.io/terms-conditions. For further
+** information use the contact form at https://www.qt.io/contact-us.
+**
+** GNU Lesser General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU Lesser
+** General Public License version 3 as published by the Free Software
+** Foundation and appearing in the file LICENSE.LGPL3 included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU Lesser General Public License version 3 requirements
+** will be met: https://www.gnu.org/licenses/lgpl-3.0.html.
+**
+** GNU General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU
+** General Public License version 2.0 or (at your option) the GNU General
+** Public license version 3 or any later version approved by the KDE Free
+** Qt Foundation. The licenses are as published by the Free Software
+** Foundation and appearing in the file LICENSE.GPL2 and LICENSE.GPL3
+** included in the packaging of this file. Please review the following
+** information to ensure the GNU General Public License requirements will
+** be met: https://www.gnu.org/licenses/gpl-2.0.html and
+** https://www.gnu.org/licenses/gpl-3.0.html.
+**
+** $QT_END_LICENSE$
+**
+****************************************************************************/
+
+#include "qwaylandfullscreenshellv1integration.h"
+#include "qwaylandfullscreenshellv1surface.h"
+
+QT_BEGIN_NAMESPACE
+
+namespace QtWaylandClient {
+
+bool QWaylandFullScreenShellV1Integration::initialize(QWaylandDisplay *display)
+{
+ for (const QWaylandDisplay::RegistryGlobal &global : display->globals()) {
+ if (global.interface == QLatin1String("zwp_fullscreen_shell_v1") && !m_shell) {
+ m_shell.reset(new QtWayland::zwp_fullscreen_shell_v1(display->wl_registry(), global.id, global.version));
+ break;
+ }
+ }
+
+ if (!m_shell) {
+ qCDebug(lcQpaWayland) << "Couldn't find global zwp_fullscreen_shell_v1 for fullscreen-shell";
+ return false;
+ }
+
+ return QWaylandShellIntegration::initialize(display);
+}
+
+QWaylandShellSurface *QWaylandFullScreenShellV1Integration::createShellSurface(QWaylandWindow *window)
+{
+ return new QWaylandFullScreenShellV1Surface(m_shell.data(), window);
+}
+
+} // namespace QtWaylandClient
+
+QT_END_NAMESPACE
diff --git a/src/plugins/shellintegration/fullscreen-shell-v1/qwaylandfullscreenshellv1integration.h b/src/plugins/shellintegration/fullscreen-shell-v1/qwaylandfullscreenshellv1integration.h
new file mode 100644
index 000000000..131f9e720
--- /dev/null
+++ b/src/plugins/shellintegration/fullscreen-shell-v1/qwaylandfullscreenshellv1integration.h
@@ -0,0 +1,67 @@
+/****************************************************************************
+**
+** Copyright (C) 2018 Pier Luigi Fiorini <pierluigi.fiorini@gmail.com>
+** Contact: http://www.qt-project.org/legal
+**
+** This file is part of the plugins of the Qt Toolkit.
+**
+** $QT_BEGIN_LICENSE:LGPL$
+** Commercial License Usage
+** Licensees holding valid commercial Qt licenses may use this file in
+** accordance with the commercial license agreement provided with the
+** Software or, alternatively, in accordance with the terms contained in
+** a written agreement between you and The Qt Company. For licensing terms
+** and conditions see https://www.qt.io/terms-conditions. For further
+** information use the contact form at https://www.qt.io/contact-us.
+**
+** GNU Lesser General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU Lesser
+** General Public License version 3 as published by the Free Software
+** Foundation and appearing in the file LICENSE.LGPL3 included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU Lesser General Public License version 3 requirements
+** will be met: https://www.gnu.org/licenses/lgpl-3.0.html.
+**
+** GNU General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU
+** General Public License version 2.0 or (at your option) the GNU General
+** Public license version 3 or any later version approved by the KDE Free
+** Qt Foundation. The licenses are as published by the Free Software
+** Foundation and appearing in the file LICENSE.GPL2 and LICENSE.GPL3
+** included in the packaging of this file. Please review the following
+** information to ensure the GNU General Public License requirements will
+** be met: https://www.gnu.org/licenses/gpl-2.0.html and
+** https://www.gnu.org/licenses/gpl-3.0.html.
+**
+** $QT_END_LICENSE$
+**
+****************************************************************************/
+
+#ifndef QWAYLANDFULLSCREENSHELLV1INTEGRATION_H
+#define QWAYLANDFULLSCREENSHELLV1INTEGRATION_H
+
+#include <wayland-client.h>
+#include <QtWaylandClient/private/qwayland-wayland.h>
+#include <QtWaylandClient/private/qwaylandshellintegration_p.h>
+
+#include "qwayland-fullscreen-shell-unstable-v1.h"
+
+QT_BEGIN_NAMESPACE
+
+namespace QtWaylandClient {
+
+class Q_WAYLAND_CLIENT_EXPORT QWaylandFullScreenShellV1Integration : public QWaylandShellIntegration
+{
+public:
+ bool initialize(QWaylandDisplay *display) override;
+ QWaylandShellSurface *createShellSurface(QWaylandWindow *window) override;
+
+private:
+ QScopedPointer<QtWayland::zwp_fullscreen_shell_v1> m_shell;
+};
+
+} // namespace QtWaylandClient
+
+QT_END_NAMESPACE
+
+#endif // QWAYLANDFULLSCREENSHELLV1INTEGRATION_H
diff --git a/src/plugins/shellintegration/fullscreen-shell-v1/qwaylandfullscreenshellv1surface.cpp b/src/plugins/shellintegration/fullscreen-shell-v1/qwaylandfullscreenshellv1surface.cpp
new file mode 100644
index 000000000..9a829f6e9
--- /dev/null
+++ b/src/plugins/shellintegration/fullscreen-shell-v1/qwaylandfullscreenshellv1surface.cpp
@@ -0,0 +1,61 @@
+/****************************************************************************
+**
+** Copyright (C) 2018 Pier Luigi Fiorini <pierluigi.fiorini@gmail.com>
+** Contact: http://www.qt-project.org/legal
+**
+** This file is part of the plugins of the Qt Toolkit.
+**
+** $QT_BEGIN_LICENSE:LGPL$
+** Commercial License Usage
+** Licensees holding valid commercial Qt licenses may use this file in
+** accordance with the commercial license agreement provided with the
+** Software or, alternatively, in accordance with the terms contained in
+** a written agreement between you and The Qt Company. For licensing terms
+** and conditions see https://www.qt.io/terms-conditions. For further
+** information use the contact form at https://www.qt.io/contact-us.
+**
+** GNU Lesser General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU Lesser
+** General Public License version 3 as published by the Free Software
+** Foundation and appearing in the file LICENSE.LGPL3 included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU Lesser General Public License version 3 requirements
+** will be met: https://www.gnu.org/licenses/lgpl-3.0.html.
+**
+** GNU General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU
+** General Public License version 2.0 or (at your option) the GNU General
+** Public license version 3 or any later version approved by the KDE Free
+** Qt Foundation. The licenses are as published by the Free Software
+** Foundation and appearing in the file LICENSE.GPL2 and LICENSE.GPL3
+** included in the packaging of this file. Please review the following
+** information to ensure the GNU General Public License requirements will
+** be met: https://www.gnu.org/licenses/gpl-2.0.html and
+** https://www.gnu.org/licenses/gpl-3.0.html.
+**
+** $QT_END_LICENSE$
+**
+****************************************************************************/
+
+#include <QtWaylandClient/private/qwaylandscreen_p.h>
+
+#include "qwaylandfullscreenshellv1surface.h"
+
+QT_BEGIN_NAMESPACE
+
+namespace QtWaylandClient {
+
+QWaylandFullScreenShellV1Surface::QWaylandFullScreenShellV1Surface(QtWayland::zwp_fullscreen_shell_v1 *shell, QWaylandWindow *window)
+ : QWaylandShellSurface(window)
+ , m_shell(shell)
+ , m_window(window)
+{
+ auto screen = static_cast<QWaylandScreen *>(m_window->screen());
+ m_shell->present_surface(m_window->object(),
+ QtWayland::zwp_fullscreen_shell_v1::present_method_default,
+ screen->output());
+}
+
+} // namespace QtWaylandClient
+
+QT_END_NAMESPACE
diff --git a/src/plugins/shellintegration/fullscreen-shell-v1/qwaylandfullscreenshellv1surface.h b/src/plugins/shellintegration/fullscreen-shell-v1/qwaylandfullscreenshellv1surface.h
new file mode 100644
index 000000000..718e1e861
--- /dev/null
+++ b/src/plugins/shellintegration/fullscreen-shell-v1/qwaylandfullscreenshellv1surface.h
@@ -0,0 +1,67 @@
+/****************************************************************************
+**
+** Copyright (C) 2018 Pier Luigi Fiorini <pierluigi.fiorini@gmail.com>
+** Contact: http://www.qt-project.org/legal
+**
+** This file is part of the plugins of the Qt Toolkit.
+**
+** $QT_BEGIN_LICENSE:LGPL$
+** Commercial License Usage
+** Licensees holding valid commercial Qt licenses may use this file in
+** accordance with the commercial license agreement provided with the
+** Software or, alternatively, in accordance with the terms contained in
+** a written agreement between you and The Qt Company. For licensing terms
+** and conditions see https://www.qt.io/terms-conditions. For further
+** information use the contact form at https://www.qt.io/contact-us.
+**
+** GNU Lesser General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU Lesser
+** General Public License version 3 as published by the Free Software
+** Foundation and appearing in the file LICENSE.LGPL3 included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU Lesser General Public License version 3 requirements
+** will be met: https://www.gnu.org/licenses/lgpl-3.0.html.
+**
+** GNU General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU
+** General Public License version 2.0 or (at your option) the GNU General
+** Public license version 3 or any later version approved by the KDE Free
+** Qt Foundation. The licenses are as published by the Free Software
+** Foundation and appearing in the file LICENSE.GPL2 and LICENSE.GPL3
+** included in the packaging of this file. Please review the following
+** information to ensure the GNU General Public License requirements will
+** be met: https://www.gnu.org/licenses/gpl-2.0.html and
+** https://www.gnu.org/licenses/gpl-3.0.html.
+**
+** $QT_END_LICENSE$
+**
+****************************************************************************/
+
+#ifndef QWAYLANDFULLSCREENSHELLV1SURFACE_H
+#define QWAYLANDFULLSCREENSHELLV1SURFACE_H
+
+#include <QtWaylandClient/qtwaylandclientglobal.h>
+#include <QtWaylandClient/private/qwaylandshellsurface_p.h>
+#include <QtWaylandClient/private/qwaylandwindow_p.h>
+
+#include "qwayland-fullscreen-shell-unstable-v1.h"
+
+QT_BEGIN_NAMESPACE
+
+namespace QtWaylandClient {
+
+class Q_WAYLAND_CLIENT_EXPORT QWaylandFullScreenShellV1Surface : public QWaylandShellSurface
+{
+public:
+ QWaylandFullScreenShellV1Surface(QtWayland::zwp_fullscreen_shell_v1 *shell, QWaylandWindow *window);
+
+private:
+ QtWayland::zwp_fullscreen_shell_v1 *m_shell = nullptr;
+ QWaylandWindow *m_window = nullptr;
+};
+
+} // namespace QtWaylandClient
+
+QT_END_NAMESPACE
+
+#endif // QWAYLANDFULLSCREENSHELLV1SURFACE_H
diff --git a/src/plugins/shellintegration/shellintegration.pro b/src/plugins/shellintegration/shellintegration.pro
index 48b6efa36..39c57940a 100644
--- a/src/plugins/shellintegration/shellintegration.pro
+++ b/src/plugins/shellintegration/shellintegration.pro
@@ -1,9 +1,9 @@
TEMPLATE = subdirs
+QT_FOR_CONFIG += waylandclient-private
-SUBDIRS += \
- ivi-shell \
- xdg-shell \
- xdg-shell-v5 \
- xdg-shell-v6 \
- wl-shell \
-
+qtConfig(wayland-client-fullscreen-shell-v1): SUBDIRS += fullscreen-shell-v1
+qtConfig(wayland-client-ivi-shell): SUBDIRS += ivi-shell
+qtConfig(wayland-client-wl-shell): SUBDIRS += wl-shell
+qtConfig(wayland-client-xdg-shell): SUBDIRS += xdg-shell
+qtConfig(wayland-client-xdg-shell-v5): SUBDIRS += xdg-shell-v5
+qtConfig(wayland-client-xdg-shell-v6): SUBDIRS += xdg-shell-v6
diff --git a/src/plugins/shellintegration/wl-shell/qwaylandwlshellintegration_p.h b/src/plugins/shellintegration/wl-shell/qwaylandwlshellintegration_p.h
index 80a7507d4..3d76cc310 100644
--- a/src/plugins/shellintegration/wl-shell/qwaylandwlshellintegration_p.h
+++ b/src/plugins/shellintegration/wl-shell/qwaylandwlshellintegration_p.h
@@ -51,7 +51,6 @@
// We mean it.
//
-#include <wayland-client.h>
#include <private/qwayland-wayland.h>
#include <QtWaylandClient/private/qwaylandshellintegration_p.h>
diff --git a/src/plugins/shellintegration/wl-shell/qwaylandwlshellsurface.cpp b/src/plugins/shellintegration/wl-shell/qwaylandwlshellsurface.cpp
index 88a63655c..4506c312a 100644
--- a/src/plugins/shellintegration/wl-shell/qwaylandwlshellsurface.cpp
+++ b/src/plugins/shellintegration/wl-shell/qwaylandwlshellsurface.cpp
@@ -76,11 +76,10 @@ QWaylandWlShellSurface::~QWaylandWlShellSurface()
delete m_extendedWindow;
}
-void QWaylandWlShellSurface::resize(QWaylandInputDevice *inputDevice, enum wl_shell_surface_resize edges)
+void QWaylandWlShellSurface::resize(QWaylandInputDevice *inputDevice, Qt::Edges edges)
{
- resize(inputDevice->wl_seat(),
- inputDevice->serial(),
- edges);
+ enum resize resizeEdges = convertToResizeEdges(edges);
+ resize(inputDevice->wl_seat(), inputDevice->serial(), resizeEdges);
}
bool QWaylandWlShellSurface::move(QWaylandInputDevice *inputDevice)
@@ -193,6 +192,14 @@ void QWaylandWlShellSurface::requestWindowStates(Qt::WindowStates states)
m_pending.states = states & ~Qt::WindowMinimized;
}
+enum QWaylandWlShellSurface::resize QWaylandWlShellSurface::convertToResizeEdges(Qt::Edges edges)
+{
+ return static_cast<enum resize>(
+ ((edges & Qt::TopEdge) ? resize_top : 0)
+ | ((edges & Qt::BottomEdge) ? resize_bottom : 0)
+ | ((edges & Qt::LeftEdge) ? resize_left : 0)
+ | ((edges & Qt::RightEdge) ? resize_right : 0));
+}
void QWaylandWlShellSurface::setTopLevel()
{
diff --git a/src/plugins/shellintegration/wl-shell/qwaylandwlshellsurface_p.h b/src/plugins/shellintegration/wl-shell/qwaylandwlshellsurface_p.h
index 57e06525a..324c10aac 100644
--- a/src/plugins/shellintegration/wl-shell/qwaylandwlshellsurface_p.h
+++ b/src/plugins/shellintegration/wl-shell/qwaylandwlshellsurface_p.h
@@ -53,8 +53,6 @@
#include <QtCore/QSize>
-#include <wayland-client.h>
-
#include <QtWaylandClient/qtwaylandclientglobal.h>
#include <QtWaylandClient/private/qwayland-wayland.h>
#include <QtWaylandClient/private/qwaylandshellsurface_p.h>
@@ -78,7 +76,7 @@ public:
~QWaylandWlShellSurface() override;
using QtWayland::wl_shell_surface::resize;
- void resize(QWaylandInputDevice *inputDevice, enum wl_shell_surface_resize edges) override;
+ void resize(QWaylandInputDevice *inputDevice, Qt::Edges edges) override;
using QtWayland::wl_shell_surface::move;
bool move(QWaylandInputDevice *inputDevice) override;
@@ -99,6 +97,7 @@ protected:
void requestWindowStates(Qt::WindowStates states) override;
private:
+ static enum resize convertToResizeEdges(Qt::Edges edges);
void setTopLevel();
void updateTransientParent(QWindow *parent);
void setPopup(QWaylandWindow *parent, QWaylandInputDevice *device, uint serial);
diff --git a/src/plugins/shellintegration/xdg-shell-v5/pregenerated/3rdparty/qwayland-xdg-shell-unstable-v5.cpp b/src/plugins/shellintegration/xdg-shell-v5/pregenerated/3rdparty/qwayland-xdg-shell-unstable-v5.cpp
index 0115eb1da..51979acf7 100644
--- a/src/plugins/shellintegration/xdg-shell-v5/pregenerated/3rdparty/qwayland-xdg-shell-unstable-v5.cpp
+++ b/src/plugins/shellintegration/xdg-shell-v5/pregenerated/3rdparty/qwayland-xdg-shell-unstable-v5.cpp
@@ -25,6 +25,7 @@
* DEALINGS IN THE SOFTWARE.
*/
#include "qwayland-xdg-shell-unstable-v5_p.h"
+#include <QtWaylandClient/private/wayland-wayland-client-protocol.h>
QT_BEGIN_NAMESPACE
QT_WARNING_PUSH
diff --git a/src/plugins/shellintegration/xdg-shell-v5/pregenerated/3rdparty/qwayland-xdg-shell-unstable-v5_p.h b/src/plugins/shellintegration/xdg-shell-v5/pregenerated/3rdparty/qwayland-xdg-shell-unstable-v5_p.h
index 3d8a6c13d..8fb1ea7b8 100644
--- a/src/plugins/shellintegration/xdg-shell-v5/pregenerated/3rdparty/qwayland-xdg-shell-unstable-v5_p.h
+++ b/src/plugins/shellintegration/xdg-shell-v5/pregenerated/3rdparty/qwayland-xdg-shell-unstable-v5_p.h
@@ -31,6 +31,8 @@
#include <QByteArray>
#include <QString>
+struct wl_registry;
+
QT_BEGIN_NAMESPACE
QT_WARNING_PUSH
QT_WARNING_DISABLE_GCC("-Wmissing-field-initializers")
diff --git a/src/plugins/shellintegration/xdg-shell-v5/pregenerated/3rdparty/wayland-xdg-shell-unstable-v5-client-protocol_p.h b/src/plugins/shellintegration/xdg-shell-v5/pregenerated/3rdparty/wayland-xdg-shell-unstable-v5-client-protocol_p.h
index 46644610b..8877e8830 100644
--- a/src/plugins/shellintegration/xdg-shell-v5/pregenerated/3rdparty/wayland-xdg-shell-unstable-v5-client-protocol_p.h
+++ b/src/plugins/shellintegration/xdg-shell-v5/pregenerated/3rdparty/wayland-xdg-shell-unstable-v5-client-protocol_p.h
@@ -7,7 +7,7 @@
#include <stdint.h>
#include <stddef.h>
-#include "wayland-client.h"
+#include "wayland-client-core.h"
#ifdef __cplusplus
extern "C" {
diff --git a/src/plugins/shellintegration/xdg-shell-v5/qwaylandxdgpopupv5_p.h b/src/plugins/shellintegration/xdg-shell-v5/qwaylandxdgpopupv5_p.h
index ff8e5639f..7494f6a67 100644
--- a/src/plugins/shellintegration/xdg-shell-v5/qwaylandxdgpopupv5_p.h
+++ b/src/plugins/shellintegration/xdg-shell-v5/qwaylandxdgpopupv5_p.h
@@ -53,8 +53,6 @@
#include "qwayland-xdg-shell-unstable-v5_p.h"
-#include <wayland-client.h>
-
#include <QtWaylandClient/qtwaylandclientglobal.h>
#include <QtWaylandClient/private/qwaylandshellsurface_p.h>
diff --git a/src/plugins/shellintegration/xdg-shell-v5/qwaylandxdgshellv5_p.h b/src/plugins/shellintegration/xdg-shell-v5/qwaylandxdgshellv5_p.h
index 67e5d32a7..2b0a59f17 100644
--- a/src/plugins/shellintegration/xdg-shell-v5/qwaylandxdgshellv5_p.h
+++ b/src/plugins/shellintegration/xdg-shell-v5/qwaylandxdgshellv5_p.h
@@ -56,8 +56,6 @@
#include <QtCore/QSize>
#include <QtCore/QVector>
-#include <wayland-client.h>
-
#include <QtWaylandClient/qtwaylandclientglobal.h>
#include <QtWaylandClient/private/qwaylandshellsurface_p.h>
diff --git a/src/plugins/shellintegration/xdg-shell-v5/qwaylandxdgsurfacev5.cpp b/src/plugins/shellintegration/xdg-shell-v5/qwaylandxdgsurfacev5.cpp
index 61a865cb2..b691ee747 100644
--- a/src/plugins/shellintegration/xdg-shell-v5/qwaylandxdgsurfacev5.cpp
+++ b/src/plugins/shellintegration/xdg-shell-v5/qwaylandxdgsurfacev5.cpp
@@ -73,18 +73,19 @@ QWaylandXdgSurfaceV5::~QWaylandXdgSurfaceV5()
delete m_extendedWindow;
}
-void QWaylandXdgSurfaceV5::resize(QWaylandInputDevice *inputDevice, enum wl_shell_surface_resize edges)
+QtWayland::xdg_surface_v5::resize_edge QWaylandXdgSurfaceV5::convertToResizeEdges(Qt::Edges edges)
{
- // May need some conversion if types get incompatibles, ATM they're identical
- enum resize_edge const * const arg = reinterpret_cast<enum resize_edge const *>(&edges);
- resize(inputDevice, *arg);
+ return static_cast<enum resize_edge>(
+ ((edges & Qt::TopEdge) ? resize_edge_top : 0)
+ | ((edges & Qt::BottomEdge) ? resize_edge_bottom : 0)
+ | ((edges & Qt::LeftEdge) ? resize_edge_left : 0)
+ | ((edges & Qt::RightEdge) ? resize_edge_right : 0));
}
-void QWaylandXdgSurfaceV5::resize(QWaylandInputDevice *inputDevice, enum resize_edge edges)
+void QWaylandXdgSurfaceV5::resize(QWaylandInputDevice *inputDevice, Qt::Edges edges)
{
- resize(inputDevice->wl_seat(),
- inputDevice->serial(),
- edges);
+ resize_edge resizeEdges = convertToResizeEdges(edges);
+ resize(inputDevice->wl_seat(), inputDevice->serial(), resizeEdges);
}
bool QWaylandXdgSurfaceV5::move(QWaylandInputDevice *inputDevice)
diff --git a/src/plugins/shellintegration/xdg-shell-v5/qwaylandxdgsurfacev5_p.h b/src/plugins/shellintegration/xdg-shell-v5/qwaylandxdgsurfacev5_p.h
index b938047ec..231a56d84 100644
--- a/src/plugins/shellintegration/xdg-shell-v5/qwaylandxdgsurfacev5_p.h
+++ b/src/plugins/shellintegration/xdg-shell-v5/qwaylandxdgsurfacev5_p.h
@@ -59,8 +59,6 @@
#include <QtCore/QSize>
#include <QtCore/QMargins>
-#include <wayland-client.h>
-
QT_BEGIN_NAMESPACE
class QWindow;
@@ -81,9 +79,8 @@ public:
~QWaylandXdgSurfaceV5() override;
using QtWayland::xdg_surface_v5::resize;
- void resize(QWaylandInputDevice *inputDevice, enum resize_edge edges);
-
- void resize(QWaylandInputDevice *inputDevice, enum wl_shell_surface_resize edges) override;
+ static resize_edge convertToResizeEdges(Qt::Edges edges);
+ void resize(QWaylandInputDevice *inputDevice, Qt::Edges edges) override;
using QtWayland::xdg_surface_v5::move;
bool move(QWaylandInputDevice *inputDevice) override;
diff --git a/src/plugins/shellintegration/xdg-shell-v6/qwaylandxdgshellv6.cpp b/src/plugins/shellintegration/xdg-shell-v6/qwaylandxdgshellv6.cpp
index 9e55e3e16..e12573ad0 100644
--- a/src/plugins/shellintegration/xdg-shell-v6/qwaylandxdgshellv6.cpp
+++ b/src/plugins/shellintegration/xdg-shell-v6/qwaylandxdgshellv6.cpp
@@ -157,6 +157,15 @@ void QWaylandXdgSurfaceV6::Toplevel::requestWindowStates(Qt::WindowStates states
}
}
+QtWayland::zxdg_toplevel_v6::resize_edge QWaylandXdgSurfaceV6::Toplevel::convertToResizeEdges(Qt::Edges edges)
+{
+ return static_cast<enum resize_edge>(
+ ((edges & Qt::TopEdge) ? resize_edge_top : 0)
+ | ((edges & Qt::BottomEdge) ? resize_edge_bottom : 0)
+ | ((edges & Qt::LeftEdge) ? resize_edge_left : 0)
+ | ((edges & Qt::RightEdge) ? resize_edge_right : 0));
+}
+
QWaylandXdgSurfaceV6::Popup::Popup(QWaylandXdgSurfaceV6 *xdgSurface, QWaylandXdgSurfaceV6 *parent,
QtWayland::zxdg_positioner_v6 *positioner)
: zxdg_popup_v6(xdgSurface->get_popup(parent->object(), positioner->object()))
@@ -226,19 +235,13 @@ QWaylandXdgSurfaceV6::~QWaylandXdgSurfaceV6()
destroy();
}
-void QWaylandXdgSurfaceV6::resize(QWaylandInputDevice *inputDevice, zxdg_toplevel_v6_resize_edge edges)
+void QWaylandXdgSurfaceV6::resize(QWaylandInputDevice *inputDevice, Qt::Edges edges)
{
Q_ASSERT(m_toplevel && m_toplevel->isInitialized());
- m_toplevel->resize(inputDevice->wl_seat(), inputDevice->serial(), edges);
+ auto resizeEdges = Toplevel::convertToResizeEdges(edges);
+ m_toplevel->resize(inputDevice->wl_seat(), inputDevice->serial(), resizeEdges);
}
-void QWaylandXdgSurfaceV6::resize(QWaylandInputDevice *inputDevice, enum wl_shell_surface_resize edges)
-{
- auto xdgEdges = reinterpret_cast<enum zxdg_toplevel_v6_resize_edge const *>(&edges);
- resize(inputDevice, *xdgEdges);
-}
-
-
bool QWaylandXdgSurfaceV6::move(QWaylandInputDevice *inputDevice)
{
if (m_toplevel && m_toplevel->isInitialized()) {
diff --git a/src/plugins/shellintegration/xdg-shell-v6/qwaylandxdgshellv6_p.h b/src/plugins/shellintegration/xdg-shell-v6/qwaylandxdgshellv6_p.h
index 659aad047..5a2867379 100644
--- a/src/plugins/shellintegration/xdg-shell-v6/qwaylandxdgshellv6_p.h
+++ b/src/plugins/shellintegration/xdg-shell-v6/qwaylandxdgshellv6_p.h
@@ -60,8 +60,6 @@
#include <QtCore/QSize>
#include <QtGui/QRegion>
-#include <wayland-client.h>
-
QT_BEGIN_NAMESPACE
class QWindow;
@@ -79,8 +77,7 @@ public:
QWaylandXdgSurfaceV6(QWaylandXdgShellV6 *shell, ::zxdg_surface_v6 *surface, QWaylandWindow *window);
~QWaylandXdgSurfaceV6() override;
- void resize(QWaylandInputDevice *inputDevice, enum zxdg_toplevel_v6_resize_edge edges);
- void resize(QWaylandInputDevice *inputDevice, enum wl_shell_surface_resize edges) override;
+ void resize(QWaylandInputDevice *inputDevice, Qt::Edges edges) override;
bool move(QWaylandInputDevice *inputDevice) override;
void setTitle(const QString &title) override;
void setAppId(const QString &appId) override;
@@ -108,6 +105,9 @@ private:
void zxdg_toplevel_v6_close() override;
void requestWindowStates(Qt::WindowStates states);
+
+ static resize_edge convertToResizeEdges(Qt::Edges edges);
+
struct {
QSize size = {0, 0};
Qt::WindowStates states = Qt::WindowNoState;
diff --git a/src/plugins/shellintegration/xdg-shell/qwaylandxdgshell.cpp b/src/plugins/shellintegration/xdg-shell/qwaylandxdgshell.cpp
index 1310e340d..8759cb8c9 100644
--- a/src/plugins/shellintegration/xdg-shell/qwaylandxdgshell.cpp
+++ b/src/plugins/shellintegration/xdg-shell/qwaylandxdgshell.cpp
@@ -185,6 +185,15 @@ void QWaylandXdgSurface::Toplevel::requestWindowStates(Qt::WindowStates states)
}
}
+QtWayland::xdg_toplevel::resize_edge QWaylandXdgSurface::Toplevel::convertToResizeEdges(Qt::Edges edges)
+{
+ return static_cast<enum resize_edge>(
+ ((edges & Qt::TopEdge) ? resize_edge_top : 0)
+ | ((edges & Qt::BottomEdge) ? resize_edge_bottom : 0)
+ | ((edges & Qt::LeftEdge) ? resize_edge_left : 0)
+ | ((edges & Qt::RightEdge) ? resize_edge_right : 0));
+}
+
QWaylandXdgSurface::Popup::Popup(QWaylandXdgSurface *xdgSurface, QWaylandXdgSurface *parent,
QtWayland::xdg_positioner *positioner)
: xdg_popup(xdgSurface->get_popup(parent->object(), positioner->object()))
@@ -254,19 +263,13 @@ QWaylandXdgSurface::~QWaylandXdgSurface()
destroy();
}
-void QWaylandXdgSurface::resize(QWaylandInputDevice *inputDevice, xdg_toplevel_resize_edge edges)
+void QWaylandXdgSurface::resize(QWaylandInputDevice *inputDevice, Qt::Edges edges)
{
Q_ASSERT(m_toplevel && m_toplevel->isInitialized());
- m_toplevel->resize(inputDevice->wl_seat(), inputDevice->serial(), edges);
+ auto resizeEdges = Toplevel::convertToResizeEdges(edges);
+ m_toplevel->resize(inputDevice->wl_seat(), inputDevice->serial(), resizeEdges);
}
-void QWaylandXdgSurface::resize(QWaylandInputDevice *inputDevice, enum wl_shell_surface_resize edges)
-{
- auto xdgEdges = reinterpret_cast<enum xdg_toplevel_resize_edge const *>(&edges);
- resize(inputDevice, *xdgEdges);
-}
-
-
bool QWaylandXdgSurface::move(QWaylandInputDevice *inputDevice)
{
if (m_toplevel && m_toplevel->isInitialized()) {
diff --git a/src/plugins/shellintegration/xdg-shell/qwaylandxdgshell_p.h b/src/plugins/shellintegration/xdg-shell/qwaylandxdgshell_p.h
index 741b83cfd..1dc1def23 100644
--- a/src/plugins/shellintegration/xdg-shell/qwaylandxdgshell_p.h
+++ b/src/plugins/shellintegration/xdg-shell/qwaylandxdgshell_p.h
@@ -62,8 +62,6 @@
#include <QtCore/QSize>
#include <QtGui/QRegion>
-#include <wayland-client.h>
-
QT_BEGIN_NAMESPACE
class QWindow;
@@ -82,8 +80,7 @@ public:
QWaylandXdgSurface(QWaylandXdgShell *shell, ::xdg_surface *surface, QWaylandWindow *window);
~QWaylandXdgSurface() override;
- void resize(QWaylandInputDevice *inputDevice, enum xdg_toplevel_resize_edge edges);
- void resize(QWaylandInputDevice *inputDevice, enum wl_shell_surface_resize edges) override;
+ void resize(QWaylandInputDevice *inputDevice, Qt::Edges edges) override;
bool move(QWaylandInputDevice *inputDevice) override;
void setTitle(const QString &title) override;
void setAppId(const QString &appId) override;
@@ -114,6 +111,9 @@ private:
void requestWindowFlags(Qt::WindowFlags flags);
void requestWindowStates(Qt::WindowStates states);
+
+ static resize_edge convertToResizeEdges(Qt::Edges edges);
+
struct {
QSize size = {0, 0};
Qt::WindowStates states = Qt::WindowNoState;