mirror of
https://github.com/hyprwm/Hyprland
synced 2024-11-07 15:45:59 +01:00
sessionLock: call wlr_surface_map/_unmap on the surface manually
fixes unmapped subsurfaces etc ref #5816
This commit is contained in:
parent
a09103cd38
commit
70ebc3add3
2 changed files with 7 additions and 2 deletions
|
@ -36,8 +36,10 @@ CSessionLockSurface::CSessionLockSurface(SP<CExtSessionLockSurfaceV1> resource_,
|
||||||
|
|
||||||
if (committed)
|
if (committed)
|
||||||
events.commit.emit();
|
events.commit.emit();
|
||||||
else
|
else {
|
||||||
|
wlr_surface_map(pSurface);
|
||||||
events.map.emit();
|
events.map.emit();
|
||||||
|
}
|
||||||
committed = true;
|
committed = true;
|
||||||
},
|
},
|
||||||
this, "SessionLockSurface");
|
this, "SessionLockSurface");
|
||||||
|
@ -46,6 +48,7 @@ CSessionLockSurface::CSessionLockSurface(SP<CExtSessionLockSurfaceV1> resource_,
|
||||||
&pSurface->events.destroy,
|
&pSurface->events.destroy,
|
||||||
[this](void* owner, void* data) {
|
[this](void* owner, void* data) {
|
||||||
LOGM(WARN, "SessionLockSurface object remains but surface is being destroyed???");
|
LOGM(WARN, "SessionLockSurface object remains but surface is being destroyed???");
|
||||||
|
wlr_surface_unmap(pSurface);
|
||||||
hyprListener_surfaceCommit.removeCallback();
|
hyprListener_surfaceCommit.removeCallback();
|
||||||
hyprListener_surfaceDestroy.removeCallback();
|
hyprListener_surfaceDestroy.removeCallback();
|
||||||
pSurface = nullptr;
|
pSurface = nullptr;
|
||||||
|
@ -58,6 +61,8 @@ CSessionLockSurface::CSessionLockSurface(SP<CExtSessionLockSurfaceV1> resource_,
|
||||||
}
|
}
|
||||||
|
|
||||||
CSessionLockSurface::~CSessionLockSurface() {
|
CSessionLockSurface::~CSessionLockSurface() {
|
||||||
|
if (pSurface && pSurface->mapped)
|
||||||
|
wlr_surface_unmap(pSurface);
|
||||||
hyprListener_surfaceCommit.removeCallback();
|
hyprListener_surfaceCommit.removeCallback();
|
||||||
hyprListener_surfaceDestroy.removeCallback();
|
hyprListener_surfaceDestroy.removeCallback();
|
||||||
events.destroy.emit(); // just in case.
|
events.destroy.emit(); // just in case.
|
||||||
|
|
|
@ -745,7 +745,7 @@ void CHyprRenderer::renderSessionLockSurface(SSessionLockSurface* pSurface, CMon
|
||||||
renderdata.w = pMonitor->vecSize.x;
|
renderdata.w = pMonitor->vecSize.x;
|
||||||
renderdata.h = pMonitor->vecSize.y;
|
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) {
|
void CHyprRenderer::renderAllClientsForWorkspace(CMonitor* pMonitor, PHLWORKSPACE pWorkspace, timespec* time, const Vector2D& translate, const float& scale) {
|
||||||
|
|
Loading…
Reference in a new issue