Clear wallpaper from monitor before destroying ouput (#79)

Fixes issue #54.
This commit is contained in:
Lukas Fleischer 2023-07-26 04:45:00 -04:00 committed by GitHub
parent 5d896893de
commit 9261356bd7
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -137,6 +137,7 @@ void Events::handleGlobalRemove(void *data, struct wl_registry *registry, uint32
for (auto& m : g_pHyprpaper->m_vMonitors) {
if (m->wayland_name == name) {
Debug::log(LOG, "Destroying output %s", m->name.c_str());
g_pHyprpaper->clearWallpaperFromMonitor(m->name);
std::erase_if(g_pHyprpaper->m_vMonitors, [&](const auto& other) { return other->wayland_name == name; });
return;
}