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
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
19 changed files with 142 additions and 14 deletions

View file

@ -177,7 +177,7 @@ void Events::listener_monitorFrame(void* owner, void* data) {
}
}
g_pProtocolManager->m_pToplevelExportProtocolManager->onMonitorRender(PMONITOR); // dispatch any toplevel sharing
EMIT_HOOK_EVENT("preRender", PMONITOR);
timespec now;
clock_gettime(CLOCK_MONOTONIC, &now);
@ -192,8 +192,6 @@ void Events::listener_monitorFrame(void* owner, void* data) {
return;
}
g_pHyprOpenGL->preRender(PMONITOR);
if (!wlr_output_damage_attach_render(PMONITOR->damage, &hasChanged, &damage)) {
Debug::log(ERR, "Couldn't attach render to display %s ???", PMONITOR->szName.c_str());
return;