diff options
| author | Vaxry <43317083+vaxerski@users.noreply.github.com> | 2023-02-19 20:54:53 +0000 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2023-02-19 20:54:53 +0000 |
| commit | 1b56cc4e99c391a94fc05a24e1f71c8e425168f1 (patch) | |
| tree | 110cf0d60d9f01bcbcf3624458afa5ededb5fe8a /src/events/Layers.cpp | |
| parent | 6e16627cbcb5d4712195c97e106f2198076c8aff (diff) | |
Added an Event Hook System (#1578)
* added an eventHookSystem
* Add all socket2 events to hooks
Diffstat (limited to 'src/events/Layers.cpp')
| -rw-r--r-- | src/events/Layers.cpp | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/src/events/Layers.cpp b/src/events/Layers.cpp index e72af5dd..65f679d5 100644 --- a/src/events/Layers.cpp +++ b/src/events/Layers.cpp @@ -166,6 +166,7 @@ void Events::listener_mapLayerSurface(void* owner, void* data) { layersurface->fadingOut = false; g_pEventManager->postEvent(SHyprIPCEvent{"openlayer", std::string(layersurface->layerSurface->_namespace ? layersurface->layerSurface->_namespace : "")}); + EMIT_HOOK_EVENT("openLayer", layersurface); g_pProtocolManager->m_pFractionalScaleProtocolManager->setPreferredScaleForSurface(layersurface->layerSurface->surface, PMONITOR->scale); } @@ -176,6 +177,7 @@ 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 : "")}); + EMIT_HOOK_EVENT("closeLayer", layersurface); if (!g_pCompositor->getMonitorFromID(layersurface->monitorID) || g_pCompositor->m_bUnsafeState) { Debug::log(WARN, "Layersurface unmapping on invalid monitor (removed?) ignoring."); |
