diff options
author | David Redondo <qt@david-redondo.de> | 2023-04-28 13:17:42 +0200 |
---|---|---|
committer | David Redondo <qt@david-redondo.de> | 2023-05-17 07:32:54 +0200 |
commit | 851a01767850b49b4c691a1694252530857e8518 (patch) | |
tree | b33906ac57b0d958eccb2502ece2cce9800649ca /src/hardwareintegration/client/wayland-egl/qwaylandeglwindow.cpp | |
parent | 2887b351ed70e1151cb88755ecc63fa99c12b0f1 (diff) | |
download | qtwayland-851a01767850b49b4c691a1694252530857e8518.tar.gz |
eglwindow: update integration in a connection instead of reinit
Since m_clientBufferIntegration is not initialized from
QWaylandWindow::initSurface it doesn't make sense to update it in reinit.
It needs to update the member regardless of reinit is called or not.
Change-Id: I1d6a6f1818cf8cdedafaa6375292d96c21c9b527
Reviewed-by: David Edmundson <davidedmundson@kde.org>
Diffstat (limited to 'src/hardwareintegration/client/wayland-egl/qwaylandeglwindow.cpp')
-rw-r--r-- | src/hardwareintegration/client/wayland-egl/qwaylandeglwindow.cpp | 10 |
1 files changed, 4 insertions, 6 deletions
diff --git a/src/hardwareintegration/client/wayland-egl/qwaylandeglwindow.cpp b/src/hardwareintegration/client/wayland-egl/qwaylandeglwindow.cpp index ca7d58f3..4d7d4787 100644 --- a/src/hardwareintegration/client/wayland-egl/qwaylandeglwindow.cpp +++ b/src/hardwareintegration/client/wayland-egl/qwaylandeglwindow.cpp @@ -24,6 +24,10 @@ QWaylandEglWindow::QWaylandEglWindow(QWindow *window, QWaylandDisplay *display) , m_clientBufferIntegration(static_cast<QWaylandEglClientBufferIntegration *>(mDisplay->clientBufferIntegration())) , m_format(window->requestedFormat()) { + connect(display, &QWaylandDisplay::reconnected, this, [this] { + m_clientBufferIntegration = static_cast<QWaylandEglClientBufferIntegration *>( + mDisplay->clientBufferIntegration()); + }); } QWaylandEglWindow::~QWaylandEglWindow() @@ -140,12 +144,6 @@ void QWaylandEglWindow::invalidateSurface() m_contentFBO = nullptr; } -void QWaylandEglWindow::reinit() -{ - QWaylandWindow::reinit(); - m_clientBufferIntegration = static_cast<QWaylandEglClientBufferIntegration *>(mDisplay->clientBufferIntegration()); -} - EGLSurface QWaylandEglWindow::eglSurface() const { return m_eglSurface; |