diff options
author | vaxerski <[email protected]> | 2023-01-02 16:16:28 +0100 |
---|---|---|
committer | vaxerski <[email protected]> | 2023-01-02 16:16:28 +0100 |
commit | a33ecec61ef4c5749a17f52b15f0e0d0722b1f3d (patch) | |
tree | c9d3510196da9bc2d4751921328aee2455730e70 | |
parent | 9ba93f4b0a56a8cec225b7719885da8bbfab1624 (diff) | |
download | Hyprland-a33ecec61ef4c5749a17f52b15f0e0d0722b1f3d.tar.gz Hyprland-a33ecec61ef4c5749a17f52b15f0e0d0722b1f3d.zip |
destroy LS-es on disconnected monitor
-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."); |