diff --git a/src/dbackingstoreproxy.cpp b/src/dbackingstoreproxy.cpp index eaad7299..f421c0fe 100644 --- a/src/dbackingstoreproxy.cpp +++ b/src/dbackingstoreproxy.cpp @@ -136,11 +136,16 @@ void DBackingStoreProxy::composeAndFlush(QWindow *window, const QRegion ®ion, { m_proxy->composeAndFlush(window, region, offset, textures, translucentBackground); } -#else +#elif QT_VERSION < QT_VERSION_CHECK(6, 9, 2) QPlatformBackingStore::FlushResult DBackingStoreProxy::rhiFlush(QWindow *window, qreal sourceDevicePixelRatio, const QRegion ®ion, const QPoint &offset, QPlatformTextureList *textures, bool translucentBackground) { return m_proxy->rhiFlush(window, sourceDevicePixelRatio, region, offset, textures, translucentBackground); } +#else +QPlatformBackingStore::FlushResult DBackingStoreProxy::rhiFlush(QWindow *window, qreal sourceDevicePixelRatio, const QRegion ®ion, const QPoint &offset, QPlatformTextureList *textures, bool translucentBackground, qreal sourceTransformFactor) +{ + return m_proxy->rhiFlush(window, sourceDevicePixelRatio, region, offset, textures, translucentBackground, sourceTransformFactor); +} #endif #if QT_VERSION <= QT_VERSION_CHECK(6, 2, 4) diff --git a/src/dbackingstoreproxy.h b/src/dbackingstoreproxy.h index f8925547..be85ac9e 100644 --- a/src/dbackingstoreproxy.h +++ b/src/dbackingstoreproxy.h @@ -40,10 +40,14 @@ class DBackingStoreProxy : public QPlatformBackingStore void composeAndFlush(QWindow *window, const QRegion ®ion, const QPoint &offset, QPlatformTextureList *textures, bool translucentBackground) override; -#else +#elif QT_VERSION < QT_VERSION_CHECK(6, 9, 2) FlushResult rhiFlush(QWindow *window, qreal sourceDevicePixelRatio, const QRegion ®ion, const QPoint &offset, QPlatformTextureList *textures, bool translucentBackground) override; +#else + FlushResult rhiFlush(QWindow *window, qreal sourceDevicePixelRatio, const QRegion ®ion, + const QPoint &offset, QPlatformTextureList *textures, + bool translucentBackground, qreal sourceTransformFactor = 0) override; #endif #if QT_VERSION <= QT_VERSION_CHECK(6, 2, 4) GLuint toTexture(const QRegion &dirtyRegion, QSize *textureSize, TextureFlags *flags) const override; diff --git a/wayland/dwayland/dhighdpi.cpp b/wayland/dwayland/dhighdpi.cpp index 4d2cce70..4ff17f47 100755 --- a/wayland/dwayland/dhighdpi.cpp +++ b/wayland/dwayland/dhighdpi.cpp @@ -170,7 +170,14 @@ void DHighDpi::removeScreenFactorCache(QScreen *screen) // qDebug()<devicePixelRatio(); // 更新窗口大小 if (window->handle()) { +#if QT_VERSION < QT_VERSION_CHECK(6, 9, 2) QWindowSystemInterfacePrivate::GeometryChangeEvent gce(window, QHighDpi::fromNativePixels(window->handle()->geometry(), window)); +#else + QWindowSystemInterfacePrivate::GeometryChangeEvent gce(window, + QHighDpi::fromNativeWindowGeometry(window->handle()->geometry(), window), + QHighDpi::fromNativePixels(window->handle()->geometry(), window)); +#endif + QGuiApplicationPrivate::processGeometryChangeEvent(&gce); } } diff --git a/xcb/dhighdpi.cpp b/xcb/dhighdpi.cpp index 45cda3d0..023c55a5 100644 --- a/xcb/dhighdpi.cpp +++ b/xcb/dhighdpi.cpp @@ -186,7 +186,13 @@ void DHighDpi::onDPIChanged(xcb_connection_t *connection, const QByteArray &name // 更新窗口大小 if (window->handle()) { +#if QT_VERSION < QT_VERSION_CHECK(6, 9, 2) QWindowSystemInterfacePrivate::GeometryChangeEvent gce(window, QHighDpi::fromNativePixels(window->handle()->geometry(), window)); +#else + QWindowSystemInterfacePrivate::GeometryChangeEvent gce(window, + QHighDpi::fromNativeWindowGeometry(window->handle()->geometry(), window), + QHighDpi::fromNativePixels(window->handle()->geometry(), window)); +#endif QGuiApplicationPrivate::processGeometryChangeEvent(&gce); } }