From bca7804bb6e1bf5ce5a99b9ae4806be25e36993c Mon Sep 17 00:00:00 2001 From: Vaxry <43317083+vaxerski@users.noreply.github.com> Date: Sat, 27 Apr 2024 12:43:12 +0100 Subject: internal: Window storage rework - part 1 (#5762) * Window storage rework - part 1 * format * remove useless include * fix pch * format * fix crash in dwindle * fix vram leak * prefer .expired() for bool checks --- src/managers/input/InputManager.hpp | 18 +++++++++--------- 1 file changed, 9 insertions(+), 9 deletions(-) (limited to 'src/managers/input/InputManager.hpp') diff --git a/src/managers/input/InputManager.hpp b/src/managers/input/InputManager.hpp index 2795d410..e20bca2a 100644 --- a/src/managers/input/InputManager.hpp +++ b/src/managers/input/InputManager.hpp @@ -38,7 +38,7 @@ enum eBorderIconDirection { }; struct STouchData { - CWindow* touchFocusWindow = nullptr; + PHLWINDOWREF touchFocusWindow; SLayerSurface* touchFocusLS = nullptr; wlr_surface* touchFocusSurface = nullptr; Vector2D touchSurfaceOrigin; @@ -114,12 +114,12 @@ class CInputManager { STouchData m_sTouchData; // for dragging floating windows - CWindow* currentlyDraggedWindow = nullptr; - eMouseBindMode dragMode = MBIND_INVALID; - bool m_bWasDraggingWindow = false; + PHLWINDOWREF currentlyDraggedWindow; + eMouseBindMode dragMode = MBIND_INVALID; + bool m_bWasDraggingWindow = false; // for refocus to be forced - CWindow* m_pForcedFocus = nullptr; + PHLWINDOWREF m_pForcedFocus; SDrag m_sDrag; @@ -188,7 +188,7 @@ class CInputManager { bool m_bLastInputTouch = false; // for tracking mouse refocus - CWindow* m_pLastMouseFocus = nullptr; + PHLWINDOWREF m_pLastMouseFocus; wlr_surface* m_pLastMouseSurface = nullptr; // @@ -226,7 +226,7 @@ class CInputManager { // this will be set after a refocus() wlr_surface* m_pFoundSurfaceToFocus = nullptr; SLayerSurface* m_pFoundLSToFocus = nullptr; - CWindow* m_pFoundWindowToFocus = nullptr; + PHLWINDOWREF m_pFoundWindowToFocus; // for holding focus on buttons held bool m_bFocusHeldByButtons = false; @@ -238,7 +238,7 @@ class CInputManager { // idle inhibitors struct SIdleInhibitor { std::shared_ptr inhibitor; - CWindow* pWindow = nullptr; + PHLWINDOWREF pWindow; CHyprSignalListener windowDestroyListener; }; std::vector> m_vIdleInhibitors; @@ -249,7 +249,7 @@ class CInputManager { void endWorkspaceSwipe(); void setBorderCursorIcon(eBorderIconDirection); - void setCursorIconOnBorder(CWindow* w); + void setCursorIconOnBorder(PHLWINDOW w); // temporary. Obeys setUntilUnset. void setCursorImageOverride(const std::string& name); -- cgit v1.2.3