mirror of
https://github.com/hyprwm/Hyprland
synced 2024-11-10 07:05:58 +01:00
surface: emit unmap before unmapping and releasing the buffers
This commit is contained in:
parent
7df9b01d48
commit
a9d87bd666
5 changed files with 5 additions and 6 deletions
|
@ -73,8 +73,8 @@ CLayerShellResource::CLayerShellResource(SP<CZwlrLayerSurfaceV1> resource_, SP<C
|
||||||
|
|
||||||
if (!attachedBuffer && mapped) {
|
if (!attachedBuffer && mapped) {
|
||||||
mapped = false;
|
mapped = false;
|
||||||
surface->unmap();
|
|
||||||
events.unmap.emit();
|
events.unmap.emit();
|
||||||
|
surface->unmap();
|
||||||
configured = false;
|
configured = false;
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
|
@ -365,8 +365,8 @@ CXDGSurfaceResource::CXDGSurfaceResource(SP<CXdgSurface> resource_, SP<CXDGWMBas
|
||||||
|
|
||||||
if (!surface->current.buffer && mapped) {
|
if (!surface->current.buffer && mapped) {
|
||||||
mapped = false;
|
mapped = false;
|
||||||
surface->unmap();
|
|
||||||
events.unmap.emit();
|
events.unmap.emit();
|
||||||
|
surface->unmap();
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -152,8 +152,8 @@ CWLSurfaceResource::~CWLSurfaceResource() {
|
||||||
|
|
||||||
void CWLSurfaceResource::destroy() {
|
void CWLSurfaceResource::destroy() {
|
||||||
if (mapped) {
|
if (mapped) {
|
||||||
unmap();
|
|
||||||
events.unmap.emit();
|
events.unmap.emit();
|
||||||
|
unmap();
|
||||||
}
|
}
|
||||||
events.destroy.emit();
|
events.destroy.emit();
|
||||||
PROTO::compositor->destroyResource(this);
|
PROTO::compositor->destroyResource(this);
|
||||||
|
|
|
@ -87,8 +87,8 @@ CWLSubsurfaceResource::CWLSubsurfaceResource(SP<CWlSubsurface> resource_, SP<CWL
|
||||||
}
|
}
|
||||||
|
|
||||||
if (!surface->current.buffer && surface->mapped) {
|
if (!surface->current.buffer && surface->mapped) {
|
||||||
surface->unmap();
|
|
||||||
surface->events.unmap.emit();
|
surface->events.unmap.emit();
|
||||||
|
surface->unmap();
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
|
|
|
@ -114,12 +114,11 @@ void CXWaylandSurface::unmap() {
|
||||||
std::erase(g_pXWayland->pWM->mappedSurfacesStacking, self);
|
std::erase(g_pXWayland->pWM->mappedSurfacesStacking, self);
|
||||||
|
|
||||||
mapped = false;
|
mapped = false;
|
||||||
|
events.unmap.emit();
|
||||||
surface->unmap();
|
surface->unmap();
|
||||||
|
|
||||||
Debug::log(LOG, "XWayland surface {:x} unmapping", (uintptr_t)this);
|
Debug::log(LOG, "XWayland surface {:x} unmapping", (uintptr_t)this);
|
||||||
|
|
||||||
events.unmap.emit();
|
|
||||||
|
|
||||||
g_pXWayland->pWM->updateClientList();
|
g_pXWayland->pWM->updateClientList();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue