Added an Event Hook System (#1578)

* added an eventHookSystem

* Add all socket2 events to hooks
This commit is contained in:
Vaxry
2023-02-19 20:54:53 +00:00
committed by GitHub
parent 6e16627cbc
commit 1b56cc4e99
19 changed files with 142 additions and 14 deletions

View File

@@ -37,6 +37,8 @@ CToplevelExportProtocolManager::CToplevelExportProtocolManager() {
m_liDisplayDestroy.notify = handleDisplayDestroy;
wl_display_add_destroy_listener(g_pCompositor->m_sWLDisplay, &m_liDisplayDestroy);
g_pHookSystem->hookDynamic("preRender", [&](void* self, std::any data) { onMonitorRender(std::any_cast<CMonitor*>(data)); });
Debug::log(LOG, "ToplevelExportManager started successfully!");
}