diff --git a/src/events/Layers.cpp b/src/events/Layers.cpp index daa69fce..dae25391 100644 --- a/src/events/Layers.cpp +++ b/src/events/Layers.cpp @@ -152,6 +152,8 @@ void Events::listener_mapLayerSurface(void* owner, void* data) { layersurface->alpha = 255.f; layersurface->readyToDelete = false; layersurface->fadingOut = false; + + g_pEventManager->postEvent(SHyprIPCEvent{"openlayer", std::string(layersurface->layerSurface->_namespace ? layersurface->layerSurface->_namespace : "")}); } void Events::listener_unmapLayerSurface(void* owner, void* data) { @@ -159,6 +161,8 @@ void Events::listener_unmapLayerSurface(void* owner, void* data) { Debug::log(LOG, "LayerSurface %x unmapped", layersurface->layerSurface); + g_pEventManager->postEvent(SHyprIPCEvent{"closelayer", std::string(layersurface->layerSurface->_namespace ? layersurface->layerSurface->_namespace : "")}); + if (!g_pCompositor->getMonitorFromID(layersurface->monitorID) || g_pCompositor->m_bUnsafeState) { Debug::log(WARN, "Layersurface unmapping on invalid monitor (removed?) ignoring.");