summaryrefslogtreecommitdiff
path: root/src/client
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-11-03 14:13:15 +0100
commit990fef9ec80c84def8efd55565a78518ecaa3767 (patch)
treed76ab8900cff43e892d975019fec2cb1e759b823 /src/client
parent5025ac15088d1b85007b3d3439c14bdc3e4979a1 (diff)
downloadqtwayland-990fef9ec80c84def8efd55565a78518ecaa3767.tar.gz
Implement QNativeInterface::Private::QWaylandScreen
Change-Id: I2f5cc638f33fe0d884146342516efa7ce8474478 Task-number: QTBUG-94729 Reviewed-by: Tor Arne Vestbø <tor.arne.vestbo@qt.io>
Diffstat (limited to 'src/client')
-rw-r--r--src/client/qwaylandscreen_p.h11
1 files changed, 9 insertions, 2 deletions
diff --git a/src/client/qwaylandscreen_p.h b/src/client/qwaylandscreen_p.h
index 836dd039..4499f0ee 100644
--- a/src/client/qwaylandscreen_p.h
+++ b/src/client/qwaylandscreen_p.h
@@ -16,6 +16,7 @@
//
#include <qpa/qplatformscreen.h>
+#include <qpa/qplatformscreen_p.h>
#include <QtWaylandClient/qtwaylandclientglobal.h>
#include <QtWaylandClient/private/qwayland-wayland.h>
@@ -34,7 +35,10 @@ public:
QWaylandXdgOutputManagerV1(QWaylandDisplay *display, uint id, uint version);
};
-class Q_WAYLANDCLIENT_EXPORT QWaylandScreen : public QPlatformScreen, QtWayland::wl_output, QtWayland::zxdg_output_v1
+class Q_WAYLANDCLIENT_EXPORT QWaylandScreen : public QPlatformScreen,
+ QtWayland::wl_output,
+ QtWayland::zxdg_output_v1,
+ public QNativeInterface::Private::QWaylandScreen
{
public:
QWaylandScreen(QWaylandDisplay *waylandDisplay, int version, uint32_t id);
@@ -70,7 +74,10 @@ public:
#endif
uint32_t outputId() const { return m_outputId; }
- ::wl_output *output() { return QtWayland::wl_output::object(); }
+ ::wl_output *output() const override
+ {
+ return const_cast<::wl_output *>(QtWayland::wl_output::object());
+ }
static QWaylandScreen *waylandScreenFromWindow(QWindow *window);
static QWaylandScreen *fromWlOutput(::wl_output *output);