mirror of
https://github.com/hyprwm/Hyprland.git
synced 2025-08-05 22:51:58 -07:00
Reset callbacks on remap
This commit is contained in:
@@ -265,6 +265,16 @@ void CWindow::onUnmap() {
|
|||||||
}
|
}
|
||||||
|
|
||||||
void CWindow::onMap() {
|
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_vRealPosition.registerVar();
|
||||||
m_vRealSize.registerVar();
|
m_vRealSize.registerVar();
|
||||||
m_cRealBorderColor.registerVar();
|
m_cRealBorderColor.registerVar();
|
||||||
|
@@ -205,6 +205,14 @@ public:
|
|||||||
m_bRemoveBeginAfterRan = remove;
|
m_bRemoveBeginAfterRan = remove;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/* resets all callbacks. Does not call any. */
|
||||||
|
void resetAllCallbacks() {
|
||||||
|
m_fBeginCallback = nullptr;
|
||||||
|
m_fEndCallback = nullptr;
|
||||||
|
m_bRemoveBeginAfterRan = false;
|
||||||
|
m_bRemoveEndAfterRan = false;
|
||||||
|
}
|
||||||
|
|
||||||
private:
|
private:
|
||||||
|
|
||||||
Vector2D m_vValue = Vector2D(0,0);
|
Vector2D m_vValue = Vector2D(0,0);
|
||||||
|
Reference in New Issue
Block a user