From fd5b73adbb4310a654b1c874ee9a15e4634d1dca Mon Sep 17 00:00:00 2001 From: outfoxxed Date: Fri, 12 Apr 2024 01:21:26 -0700 Subject: [PATCH] wayland: fix Qt 6.7 compatibility --- src/wayland/session_lock/surface.cpp | 5 +++++ src/wayland/wlr_layershell/surface.cpp | 5 +++++ 2 files changed, 10 insertions(+) diff --git a/src/wayland/session_lock/surface.cpp b/src/wayland/session_lock/surface.cpp index 36f9eac4..57c59895 100644 --- a/src/wayland/session_lock/surface.cpp +++ b/src/wayland/session_lock/surface.cpp @@ -7,6 +7,7 @@ #include #include #include +#include #include #include "lock.hpp" @@ -88,7 +89,11 @@ void QSWaylandSessionLockSurface::ext_session_lock_surface_v1_configure( this->configured = true; this->window()->resizeFromApplyConfigure(this->size); +#if QT_VERSION < QT_VERSION_CHECK(6, 7, 0) this->window()->handleExpose(QRect(QPoint(), this->size)); +#else + this->window()->sendRecursiveExposeEvent(); +#endif if (this->visible) this->initVisible(); } else { // applyConfigureWhenPossible runs too late and causes a protocol error on reconfigure. diff --git a/src/wayland/wlr_layershell/surface.cpp b/src/wayland/wlr_layershell/surface.cpp index c5c5c9ed..ac80ebd0 100644 --- a/src/wayland/wlr_layershell/surface.cpp +++ b/src/wayland/wlr_layershell/surface.cpp @@ -10,6 +10,7 @@ #include #include #include +#include #include #include @@ -86,7 +87,11 @@ void QSWaylandLayerSurface::zwlr_layer_surface_v1_configure( if (!this->configured) { this->configured = true; this->window()->resizeFromApplyConfigure(this->size); +#if QT_VERSION < QT_VERSION_CHECK(6, 7, 0) this->window()->handleExpose(QRect(QPoint(), this->size)); +#else + this->window()->sendRecursiveExposeEvent(); +#endif } else { this->window()->applyConfigureWhenPossible(); }