aboutsummaryrefslogtreecommitdiffhomepage
diff options
context:
space:
mode:
authorvaxerski <[email protected]>2023-03-16 01:04:54 +0000
committervaxerski <[email protected]>2023-03-16 01:04:54 +0000
commitd9d57ce39ac25fd8bbfe88ec9d3bccb1e2df8650 (patch)
tree34197f58a663a087418ffbf633d7f2ddc8fc4572
parent3e261b1fa78d13daeda8bede7df3f2c6af032c46 (diff)
downloadHyprland-d9d57ce39ac25fd8bbfe88ec9d3bccb1e2df8650.tar.gz
Hyprland-d9d57ce39ac25fd8bbfe88ec9d3bccb1e2df8650.zip
monitors: fix segfault on non-unsafe remove
-rw-r--r--src/events/Monitors.cpp2
-rw-r--r--src/events/Windows.cpp2
2 files changed, 3 insertions, 1 deletions
diff --git a/src/events/Monitors.cpp b/src/events/Monitors.cpp
index b535b1f8..f6b3ed9f 100644
--- a/src/events/Monitors.cpp
+++ b/src/events/Monitors.cpp
@@ -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; });
}
diff --git a/src/events/Windows.cpp b/src/events/Windows.cpp
index aa0b2513..5b96d279 100644
--- a/src/events/Windows.cpp
+++ b/src/events/Windows.cpp
@@ -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!