diff options
author | vaxerski <[email protected]> | 2022-10-07 22:23:50 +0100 |
---|---|---|
committer | vaxerski <[email protected]> | 2022-10-07 22:25:00 +0100 |
commit | 1964bcb13f770b8344510549aa9924fe908bac60 (patch) | |
tree | 31f7df5196141fc5aa51736dec8963400e9296c9 | |
parent | 4b779ac14223cb12ced6811b82c401dfbd00ea9a (diff) | |
download | Hyprland-1964bcb13f770b8344510549aa9924fe908bac60.tar.gz Hyprland-1964bcb13f770b8344510549aa9924fe908bac60.zip |
add open/close layer events
-rw-r--r-- | src/events/Layers.cpp | 4 |
1 files changed, 4 insertions, 0 deletions
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."); |