summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorVaxry <vaxry@vaxry.net>2024-04-30 21:59:07 +0100
committerVaxry <vaxry@vaxry.net>2024-04-30 21:59:07 +0100
commit70ebc3add3b941a52f460f02129ef0842f580ec7 (patch)
tree29e18518d64537d8fd99bb5cf6e4449582ece327 /src
parenta09103cd38b934a03efdf86c785d08ed6d127bff (diff)
sessionLock: call wlr_surface_map/_unmap on the surface manually
fixes unmapped subsurfaces etc ref #5816
Diffstat (limited to 'src')
-rw-r--r--src/protocols/SessionLock.cpp7
-rw-r--r--src/render/Renderer.cpp2
2 files changed, 7 insertions, 2 deletions
diff --git a/src/protocols/SessionLock.cpp b/src/protocols/SessionLock.cpp
index 801aaeb9..ee7e201d 100644
--- a/src/protocols/SessionLock.cpp
+++ b/src/protocols/SessionLock.cpp
@@ -36,8 +36,10 @@ CSessionLockSurface::CSessionLockSurface(SP<CExtSessionLockSurfaceV1> resource_,
if (committed)
events.commit.emit();
- else
+ else {
+ wlr_surface_map(pSurface);
events.map.emit();
+ }
committed = true;
},
this, "SessionLockSurface");
@@ -46,6 +48,7 @@ CSessionLockSurface::CSessionLockSurface(SP<CExtSessionLockSurfaceV1> resource_,
&pSurface->events.destroy,
[this](void* owner, void* data) {
LOGM(WARN, "SessionLockSurface object remains but surface is being destroyed???");
+ wlr_surface_unmap(pSurface);
hyprListener_surfaceCommit.removeCallback();
hyprListener_surfaceDestroy.removeCallback();
pSurface = nullptr;
@@ -58,6 +61,8 @@ CSessionLockSurface::CSessionLockSurface(SP<CExtSessionLockSurfaceV1> resource_,
}
CSessionLockSurface::~CSessionLockSurface() {
+ if (pSurface && pSurface->mapped)
+ wlr_surface_unmap(pSurface);
hyprListener_surfaceCommit.removeCallback();
hyprListener_surfaceDestroy.removeCallback();
events.destroy.emit(); // just in case.
diff --git a/src/render/Renderer.cpp b/src/render/Renderer.cpp
index d22edf5c..6c4c6a7b 100644
--- a/src/render/Renderer.cpp
+++ b/src/render/Renderer.cpp
@@ -745,7 +745,7 @@ void CHyprRenderer::renderSessionLockSurface(SSessionLockSurface* pSurface, CMon
renderdata.w = pMonitor->vecSize.x;
renderdata.h = pMonitor->vecSize.y;
- renderSurface(renderdata.surface, 0, 0, &renderdata);
+ wlr_surface_for_each_surface(pSurface->surface.lock()->surface(), renderSurface, &renderdata);
}
void CHyprRenderer::renderAllClientsForWorkspace(CMonitor* pMonitor, PHLWORKSPACE pWorkspace, timespec* time, const Vector2D& translate, const float& scale) {