mirror of
https://github.com/hyprwm/Hyprland
synced 2024-11-07 15:05:58 +01:00
monitors: fix segfault on non-unsafe remove
This commit is contained in:
parent
3e261b1fa7
commit
d9d57ce39a
2 changed files with 3 additions and 1 deletions
|
@ -363,7 +363,7 @@ void Events::listener_monitorDestroy(void* owner, void* data) {
|
|||
|
||||
// cleanup if not unsafe
|
||||
if (!g_pCompositor->m_bUnsafeState) {
|
||||
Debug::log(LOG, "Removing monitor %s from realMonitors", pMonitor->output->name);
|
||||
Debug::log(LOG, "Removing monitor %s from realMonitors", pMonitor->szName.c_str());
|
||||
|
||||
std::erase_if(g_pCompositor->m_vRealMonitors, [&](std::shared_ptr<CMonitor>& el) { return el.get() == pMonitor; });
|
||||
}
|
||||
|
|
|
@ -694,6 +694,8 @@ void Events::listener_commitWindow(void* owner, void* data) {
|
|||
if (!PWINDOW->m_bMappedX11 || PWINDOW->isHidden() || (PWINDOW->m_bIsX11 && !PWINDOW->m_bMappedX11))
|
||||
return;
|
||||
|
||||
PWINDOW->updateSurfaceOutputs();
|
||||
|
||||
g_pHyprRenderer->damageSurface(g_pXWaylandManager->getWindowSurface(PWINDOW), PWINDOW->m_vRealPosition.goalv().x, PWINDOW->m_vRealPosition.goalv().y);
|
||||
|
||||
// Debug::log(LOG, "Window %x committed", PWINDOW); // SPAM!
|
||||
|
|
Loading…
Reference in a new issue