mirror of
https://github.com/hyprwm/Hyprland.git
synced 2025-08-07 23:51:55 -07:00
window: unassign surface on unmap
This commit is contained in:
@@ -336,6 +336,8 @@ void CWindow::onUnmap() {
|
|||||||
m_vRealSize.setCallbackOnBegin(nullptr);
|
m_vRealSize.setCallbackOnBegin(nullptr);
|
||||||
|
|
||||||
std::erase_if(g_pCompositor->m_vWindowFocusHistory, [&](const auto& other) { return other == this; });
|
std::erase_if(g_pCompositor->m_vWindowFocusHistory, [&](const auto& other) { return other == this; });
|
||||||
|
|
||||||
|
m_pWLSurface.unassign();
|
||||||
}
|
}
|
||||||
|
|
||||||
void CWindow::onMap() {
|
void CWindow::onMap() {
|
||||||
|
@@ -11,6 +11,10 @@ void CWLSurface::assign(wlr_surface* pSurface) {
|
|||||||
init();
|
init();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
void CWLSurface::unassign() {
|
||||||
|
destroy();
|
||||||
|
}
|
||||||
|
|
||||||
CWLSurface::~CWLSurface() {
|
CWLSurface::~CWLSurface() {
|
||||||
destroy();
|
destroy();
|
||||||
}
|
}
|
||||||
|
@@ -9,6 +9,7 @@ class CWLSurface {
|
|||||||
~CWLSurface();
|
~CWLSurface();
|
||||||
|
|
||||||
void assign(wlr_surface* pSurface);
|
void assign(wlr_surface* pSurface);
|
||||||
|
void unassign();
|
||||||
|
|
||||||
CWLSurface(const CWLSurface&) = delete;
|
CWLSurface(const CWLSurface&) = delete;
|
||||||
CWLSurface(CWLSurface&&) = delete;
|
CWLSurface(CWLSurface&&) = delete;
|
||||||
|
Reference in New Issue
Block a user