@@ -48,16 +48,6 @@ void QSWaylandSessionLockSurface::applyConfigure() {
4848 this ->window ()->resizeFromApplyConfigure (this ->size );
4949}
5050
51- bool QSWaylandSessionLockSurface::handleExpose (const QRegion& region) {
52- if (this ->initBuf != nullptr ) {
53- // at this point qt's next commit to the surface will have a new buffer, and we can safely delete this one.
54- delete this ->initBuf ;
55- this ->initBuf = nullptr ;
56- }
57-
58- return this ->QtWaylandClient ::QWaylandShellSurface::handleExpose (region);
59- }
60-
6151void QSWaylandSessionLockSurface::setExtension (LockWindowExtension* ext) {
6252 if (ext == nullptr ) {
6353 if (this ->window () != nullptr ) this ->window ()->window ()->close ();
@@ -71,11 +61,6 @@ void QSWaylandSessionLockSurface::setExtension(LockWindowExtension* ext) {
7161 }
7262}
7363
74- void QSWaylandSessionLockSurface::setVisible () {
75- if (this ->configured && !this ->visible ) this ->initVisible ();
76- this ->visible = true ;
77- }
78-
7964void QSWaylandSessionLockSurface::ext_session_lock_surface_v1_configure (
8065 quint32 serial,
8166 quint32 width,
@@ -97,13 +82,41 @@ void QSWaylandSessionLockSurface::ext_session_lock_surface_v1_configure(
9782#else
9883 this ->window ()->updateExposure ();
9984#endif
85+
86+ #if QT_VERSION < QT_VERSION_CHECK(6, 10, 0)
10087 if (this ->visible ) this ->initVisible ();
88+ #endif
10189 } else {
10290 // applyConfigureWhenPossible runs too late and causes a protocol error on reconfigure.
10391 this ->window ()->resizeFromApplyConfigure (this ->size );
10492 }
10593}
10694
95+ #if QT_VERSION >= QT_VERSION_CHECK(6, 10, 0)
96+
97+ bool QSWaylandSessionLockSurface::commitSurfaceRole () const { return false ; }
98+
99+ void QSWaylandSessionLockSurface::setVisible () { this ->window ()->window ()->setVisible (true ); }
100+
101+ #else
102+
103+ bool QSWaylandSessionLockSurface::handleExpose (const QRegion& region) {
104+ if (this ->initBuf != nullptr ) {
105+ // at this point qt's next commit to the surface will have a new buffer, and we can safely delete this one.
106+ delete this ->initBuf ;
107+ this ->initBuf = nullptr ;
108+ }
109+
110+ return this ->QtWaylandClient ::QWaylandShellSurface::handleExpose (region);
111+ }
112+
113+ void QSWaylandSessionLockSurface::setVisible () {
114+ if (this ->configured && !this ->visible ) this ->initVisible ();
115+ this ->visible = true ;
116+ }
117+
118+ #endif
119+
107120#if QT_VERSION < QT_VERSION_CHECK(6, 9, 0)
108121
109122#include < private/qwaylandshmbackingstore_p.h>
@@ -123,7 +136,7 @@ void QSWaylandSessionLockSurface::initVisible() {
123136 this ->window ()->window ()->setVisible (true );
124137}
125138
126- #else
139+ #elif QT_VERSION < QT_VERSION_CHECK(6, 10, 0)
127140
128141#include < cmath>
129142
0 commit comments