mirror of
https://github.com/hyprwm/Hyprland.git
synced 2025-09-30 15:18:28 +00:00
HookSystem: improve callback safety
This commit is contained in:
@@ -6,7 +6,7 @@ CHyprError::CHyprError() {
|
||||
m_fFadeOpacity.create(AVARTYPE_FLOAT, g_pConfigManager->getAnimationPropertyConfig("fadeIn"), AVARDAMAGE_NONE);
|
||||
m_fFadeOpacity.registerVar();
|
||||
|
||||
g_pHookSystem->hookDynamic("focusedMon", [&](void* self, SCallbackInfo& info, std::any param) {
|
||||
static auto P = g_pHookSystem->hookDynamic("focusedMon", [&](void* self, SCallbackInfo& info, std::any param) {
|
||||
if (!m_bIsCreated)
|
||||
return;
|
||||
|
||||
@@ -14,7 +14,7 @@ CHyprError::CHyprError() {
|
||||
m_bMonitorChanged = true;
|
||||
});
|
||||
|
||||
g_pHookSystem->hookDynamic("preRender", [&](void* self, SCallbackInfo& info, std::any param) {
|
||||
static auto P2 = g_pHookSystem->hookDynamic("preRender", [&](void* self, SCallbackInfo& info, std::any param) {
|
||||
if (!m_bIsCreated)
|
||||
return;
|
||||
|
||||
|
Reference in New Issue
Block a user