aboutsummaryrefslogtreecommitdiffhomepage
path: root/src/render/OpenGL.cpp
diff options
context:
space:
mode:
authorVaxry <[email protected]>2024-04-20 20:16:42 +0100
committerVaxry <[email protected]>2024-04-20 20:16:42 +0100
commit4ad739ec63c9a11f0537a884ae2a4c56d6bab10b (patch)
tree0842db7489691fc6e7cbb3cd6d3321dd0d4790b6 /src/render/OpenGL.cpp
parent1055e6bee677ef9c4ab4d09e43155e00a98a3b49 (diff)
downloadHyprland-4ad739ec63c9a11f0537a884ae2a4c56d6bab10b.tar.gz
Hyprland-4ad739ec63c9a11f0537a884ae2a4c56d6bab10b.zip
HookSystem: improve callback safety
Diffstat (limited to 'src/render/OpenGL.cpp')
-rw-r--r--src/render/OpenGL.cpp2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/render/OpenGL.cpp b/src/render/OpenGL.cpp
index 9e3fb47b..981541b2 100644
--- a/src/render/OpenGL.cpp
+++ b/src/render/OpenGL.cpp
@@ -52,7 +52,7 @@ CHyprOpenGLImpl::CHyprOpenGLImpl() {
Debug::log(WARN, "!RENDERER: Using the legacy GLES2 renderer!");
#endif
- g_pHookSystem->hookDynamic("preRender", [&](void* self, SCallbackInfo& info, std::any data) { preRender(std::any_cast<CMonitor*>(data)); });
+ static auto P = g_pHookSystem->hookDynamic("preRender", [&](void* self, SCallbackInfo& info, std::any data) { preRender(std::any_cast<CMonitor*>(data)); });
RASSERT(eglMakeCurrent(wlr_egl_get_display(g_pCompositor->m_sWLREGL), EGL_NO_SURFACE, EGL_NO_SURFACE, EGL_NO_CONTEXT), "Couldn't unset current EGL!");