diff options
author | David Redondo <qt@david-redondo.de> | 2022-10-12 09:01:07 +0200 |
---|---|---|
committer | David Redondo <qt@david-redondo.de> | 2022-12-08 10:31:45 +0100 |
commit | f8c8a06f08583a48e953fc989241b94325760618 (patch) | |
tree | 27e2378318bfc8abcb81bef75a3dbbc39aff320c /src/client/qwaylandwindow.cpp | |
parent | 23d3fc712cdf7fc0a4ff837082de9ba773e8605c (diff) | |
download | qtwayland-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/client/qwaylandwindow.cpp')
-rw-r--r-- | src/client/qwaylandwindow.cpp | 14 |
1 files changed, 14 insertions, 0 deletions
diff --git a/src/client/qwaylandwindow.cpp b/src/client/qwaylandwindow.cpp index 56b9af28..4e254dee 100644 --- a/src/client/qwaylandwindow.cpp +++ b/src/client/qwaylandwindow.cpp @@ -59,6 +59,11 @@ QWaylandWindow::QWaylandWindow(QWindow *window, QWaylandDisplay *display) static WId id = 1; mWindowId = id++; initializeWlSurface(); + + connect(this, &QWaylandWindow::wlSurfaceCreated, this, + &QNativeInterface::Private::QWaylandWindow::surfaceCreated); + connect(this, &QWaylandWindow::wlSurfaceDestroyed, this, + &QNativeInterface::Private::QWaylandWindow::surfaceDestroyed); } QWaylandWindow::~QWaylandWindow() @@ -847,6 +852,15 @@ QWaylandShellSurface *QWaylandWindow::shellSurface() const return mShellSurface; } +std::any QWaylandWindow::_surfaceRole() const +{ + if (mSubSurfaceWindow) + return mSubSurfaceWindow->object(); + if (mShellSurface) + return mShellSurface->surfaceRole(); + return {}; +} + QWaylandSubSurface *QWaylandWindow::subSurfaceWindow() const { return mSubSurfaceWindow; |