diff --git a/src/plugins/platforms/wayland/qwaylandwindow.cpp b/src/plugins/platforms/wayland/qwaylandwindow.cpp index 505836296c4..d7bb6c6529a 100644 --- a/src/plugins/platforms/wayland/qwaylandwindow.cpp +++ b/src/plugins/platforms/wayland/qwaylandwindow.cpp @@ -1500,6 +1500,13 @@ QVariant QWaylandWindow::property(const QString &name, const QVariant &defaultVa return m_properties.value(name, defaultValue); } +#ifdef QT_PLATFORM_WINDOW_HAS_VIRTUAL_SET_BACKING_STORE +void QWaylandWindow::setBackingStore(QPlatformBackingStore *store) +{ + mBackingStore = dynamic_cast(store); +} +#endif + void QWaylandWindow::timerEvent(QTimerEvent *event) { if (event->timerId() != mFrameCallbackCheckIntervalTimerId) diff --git a/src/plugins/platforms/wayland/qwaylandwindow_p.h b/src/plugins/platforms/wayland/qwaylandwindow_p.h index 042ea56603b..17140c52e9f 100644 --- a/src/plugins/platforms/wayland/qwaylandwindow_p.h +++ b/src/plugins/platforms/wayland/qwaylandwindow_p.h @@ -201,7 +201,11 @@ public: QVariant property(const QString &name); QVariant property(const QString &name, const QVariant &defaultValue); +#ifdef QT_PLATFORM_WINDOW_HAS_VIRTUAL_SET_BACKING_STORE + void setBackingStore(QPlatformBackingStore *store) override; +#else void setBackingStore(QWaylandShmBackingStore *backingStore) { mBackingStore = backingStore; } +#endif QWaylandShmBackingStore *backingStore() const { return mBackingStore; } void setShellIntegration(QWaylandShellIntegration *shellIntegration);