destroy LS-es on disconnected monitor

This commit is contained in:
Vaxry 2023-01-02 16:16:28 +01:00
parent 9ba93f4b0a
commit a33ecec61e

View file

@ -192,6 +192,12 @@ void CMonitor::onDisconnect() {
hyprListener_monitorFrame.removeCallback(); 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) { if (!BACKUPMON) {
Debug::log(WARN, "Unplugged last monitor, entering an unsafe state. Good luck my friend."); Debug::log(WARN, "Unplugged last monitor, entering an unsafe state. Good luck my friend.");