From f91f3d1c81f89dc3fcb468672fbd0f1030d7b7ac Mon Sep 17 00:00:00 2001 From: vaxerski <43317083+vaxerski@users.noreply.github.com> Date: Fri, 18 Nov 2022 13:53:54 +0000 Subject: Reset callbacks on remap --- src/Window.cpp | 10 ++++++++++ 1 file changed, 10 insertions(+) (limited to 'src/Window.cpp') diff --git a/src/Window.cpp b/src/Window.cpp index 31cbb3ce..66035f42 100644 --- a/src/Window.cpp +++ b/src/Window.cpp @@ -265,6 +265,16 @@ void CWindow::onUnmap() { } void CWindow::onMap() { + + // JIC, reset the callbacks. If any are set, we'll make sure they are cleared so we don't accidentally unset them. (In case a window got remapped) + m_vRealPosition.resetAllCallbacks(); + m_vRealSize.resetAllCallbacks(); + m_cRealBorderColor.resetAllCallbacks(); + m_fActiveInactiveAlpha.resetAllCallbacks(); + m_fAlpha.resetAllCallbacks(); + m_cRealShadowColor.resetAllCallbacks(); + m_fDimPercent.resetAllCallbacks(); + m_vRealPosition.registerVar(); m_vRealSize.registerVar(); m_cRealBorderColor.registerVar(); -- cgit v1.2.3