diff options
-rw-r--r-- | src/helpers/Monitor.cpp | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/src/helpers/Monitor.cpp b/src/helpers/Monitor.cpp index b27b2c4c..b87a995e 100644 --- a/src/helpers/Monitor.cpp +++ b/src/helpers/Monitor.cpp @@ -192,6 +192,12 @@ void CMonitor::onDisconnect() { hyprListener_monitorFrame.removeCallback(); + for (size_t i = 0; i < 4; ++i) { + for (auto& ls : m_aLayerSurfaceLists[i]) { + wlr_layer_surface_v1_destroy(ls->layerSurface); + } + } + if (!BACKUPMON) { Debug::log(WARN, "Unplugged last monitor, entering an unsafe state. Good luck my friend."); |