mirror of
https://github.com/hyprwm/hyprlock.git
synced 2024-12-22 05:19:48 +01:00
core: remove renderer widgets in ~CSessionLockSurface instead of in onGlobalRemoved
This commit is contained in:
parent
d2324c25bd
commit
405aa42de8
2 changed files with 3 additions and 5 deletions
|
@ -27,6 +27,8 @@ static const wp_fractional_scale_v1_listener fsListener = {
|
|||
};
|
||||
|
||||
CSessionLockSurface::~CSessionLockSurface() {
|
||||
g_pRenderer->removeWidgetsFor(this);
|
||||
|
||||
if (fractional) {
|
||||
wp_viewport_destroy(viewport);
|
||||
wp_fractional_scale_v1_destroy(fractional);
|
||||
|
|
|
@ -300,11 +300,7 @@ void CHyprlock::onGlobal(void* data, struct wl_registry* registry, uint32_t name
|
|||
|
||||
void CHyprlock::onGlobalRemoved(void* data, struct wl_registry* registry, uint32_t name) {
|
||||
Debug::log(LOG, " | removed iface {}", name);
|
||||
auto outputIt = std::find_if(m_vOutputs.begin(), m_vOutputs.end(), [name](const auto& other) { return other->name == name; });
|
||||
if (outputIt != m_vOutputs.end()) {
|
||||
g_pRenderer->removeWidgetsFor(outputIt->get()->sessionLockSurface.get());
|
||||
m_vOutputs.erase(outputIt);
|
||||
}
|
||||
std::erase_if(m_vOutputs, [name](const auto& other) { return other->name == name; });
|
||||
}
|
||||
|
||||
// end wl_registry
|
||||
|
|
Loading…
Reference in a new issue