summaryrefslogtreecommitdiff
path: root/src/plugins
diff options
context:
space:
mode:
authorDavid Redondo <qt@david-redondo.de>2022-10-12 09:01:07 +0200
committerDavid Redondo <qt@david-redondo.de>2022-12-08 10:31:45 +0100
commitf8c8a06f08583a48e953fc989241b94325760618 (patch)
tree27e2378318bfc8abcb81bef75a3dbbc39aff320c /src/plugins
parent23d3fc712cdf7fc0a4ff837082de9ba773e8605c (diff)
downloadqtwayland-f8c8a06f08583a48e953fc989241b94325760618.tar.gz
client: Implement QNativeInterface::Private::QWaylandWindow
Task-number: QTBUG-94729 Change-Id: Ib79f3199a4518700aa032c5ca4760a2b53c401e5 Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org> Reviewed-by: David Edmundson <davidedmundson@kde.org>
Diffstat (limited to 'src/plugins')
-rw-r--r--src/plugins/shellintegration/fullscreen-shell-v1/qwaylandfullscreenshellv1surface.h1
-rw-r--r--src/plugins/shellintegration/ivi-shell/qwaylandivisurface_p.h2
-rw-r--r--src/plugins/shellintegration/qt-shell/qwaylandqtsurface_p.h2
-rw-r--r--src/plugins/shellintegration/wl-shell/qwaylandwlshellsurface_p.h2
-rw-r--r--src/plugins/shellintegration/xdg-shell/qwaylandxdgshell.cpp9
-rw-r--r--src/plugins/shellintegration/xdg-shell/qwaylandxdgshell_p.h2
6 files changed, 18 insertions, 0 deletions
diff --git a/src/plugins/shellintegration/fullscreen-shell-v1/qwaylandfullscreenshellv1surface.h b/src/plugins/shellintegration/fullscreen-shell-v1/qwaylandfullscreenshellv1surface.h
index 8affdfd6..0a82e5ee 100644
--- a/src/plugins/shellintegration/fullscreen-shell-v1/qwaylandfullscreenshellv1surface.h
+++ b/src/plugins/shellintegration/fullscreen-shell-v1/qwaylandfullscreenshellv1surface.h
@@ -18,6 +18,7 @@ class Q_WAYLANDCLIENT_EXPORT QWaylandFullScreenShellV1Surface : public QWaylandS
{
public:
QWaylandFullScreenShellV1Surface(QtWayland::zwp_fullscreen_shell_v1 *shell, QWaylandWindow *window);
+ std::any surfaceRole() const override { return m_shell->object(); }
private:
QtWayland::zwp_fullscreen_shell_v1 *m_shell = nullptr;
diff --git a/src/plugins/shellintegration/ivi-shell/qwaylandivisurface_p.h b/src/plugins/shellintegration/ivi-shell/qwaylandivisurface_p.h
index 7e6811fd..853897cd 100644
--- a/src/plugins/shellintegration/ivi-shell/qwaylandivisurface_p.h
+++ b/src/plugins/shellintegration/ivi-shell/qwaylandivisurface_p.h
@@ -28,6 +28,8 @@ public:
void applyConfigure() override;
+ std::any surfaceRole() const override { return ivi_surface::object(); };
+
private:
void createExtendedSurface(QWaylandWindow *window);
void ivi_surface_configure(int32_t width, int32_t height) override;
diff --git a/src/plugins/shellintegration/qt-shell/qwaylandqtsurface_p.h b/src/plugins/shellintegration/qt-shell/qwaylandqtsurface_p.h
index 2f95dd71..53c37f79 100644
--- a/src/plugins/shellintegration/qt-shell/qwaylandqtsurface_p.h
+++ b/src/plugins/shellintegration/qt-shell/qwaylandqtsurface_p.h
@@ -42,6 +42,8 @@ public:
void raise() override;
void lower() override;
+ std::any surfaceRole() const override { return object(); };
+
private:
void resetConfiguration();
void sendSizeHints();
diff --git a/src/plugins/shellintegration/wl-shell/qwaylandwlshellsurface_p.h b/src/plugins/shellintegration/wl-shell/qwaylandwlshellsurface_p.h
index d3996f43..24600302 100644
--- a/src/plugins/shellintegration/wl-shell/qwaylandwlshellsurface_p.h
+++ b/src/plugins/shellintegration/wl-shell/qwaylandwlshellsurface_p.h
@@ -57,6 +57,8 @@ public:
void applyConfigure() override;
bool wantsDecorations() const override;
+ std::any surfaceRole() const override { return object(); };
+
protected:
void requestWindowStates(Qt::WindowStates states) override;
diff --git a/src/plugins/shellintegration/xdg-shell/qwaylandxdgshell.cpp b/src/plugins/shellintegration/xdg-shell/qwaylandxdgshell.cpp
index 9bd5209f..c1462e07 100644
--- a/src/plugins/shellintegration/xdg-shell/qwaylandxdgshell.cpp
+++ b/src/plugins/shellintegration/xdg-shell/qwaylandxdgshell.cpp
@@ -417,6 +417,15 @@ void *QWaylandXdgSurface::nativeResource(const QByteArray &resource)
return nullptr;
}
+std::any QWaylandXdgSurface::surfaceRole() const
+{
+ if (m_toplevel)
+ return m_toplevel->object();
+ if (m_popup)
+ return m_popup->object();
+ return {};
+}
+
void QWaylandXdgSurface::requestWindowStates(Qt::WindowStates states)
{
if (m_toplevel)
diff --git a/src/plugins/shellintegration/xdg-shell/qwaylandxdgshell_p.h b/src/plugins/shellintegration/xdg-shell/qwaylandxdgshell_p.h
index abfd0db3..58860269 100644
--- a/src/plugins/shellintegration/xdg-shell/qwaylandxdgshell_p.h
+++ b/src/plugins/shellintegration/xdg-shell/qwaylandxdgshell_p.h
@@ -72,6 +72,8 @@ public:
void *nativeResource(const QByteArray &resource);
+ std::any surfaceRole() const override;
+
protected:
void requestWindowStates(Qt::WindowStates states) override;
void xdg_surface_configure(uint32_t serial) override;