diff options
Diffstat (limited to 'src/managers/input/InputManager.hpp')
| -rw-r--r-- | src/managers/input/InputManager.hpp | 16 |
1 files changed, 12 insertions, 4 deletions
diff --git a/src/managers/input/InputManager.hpp b/src/managers/input/InputManager.hpp index dd8f5c63..47773fff 100644 --- a/src/managers/input/InputManager.hpp +++ b/src/managers/input/InputManager.hpp @@ -2,6 +2,7 @@ #include "../../defines.hpp" #include <list> +#include <any> #include "../../helpers/WLClasses.hpp" #include "../../helpers/Timer.hpp" #include "InputMethodRelay.hpp" @@ -9,6 +10,7 @@ class CConstraint; class CWindow; +class CIdleInhibitor; enum eClickBehaviorMode { CLICKMODE_DEFAULT = 0, @@ -132,9 +134,6 @@ class CInputManager { std::list<STabletTool> m_lTabletTools; std::list<STabletPad> m_lTabletPads; - // idle inhibitors - std::list<SIdleInhibitor> m_lIdleInhibitors; - // Touch devices std::list<STouchDevice> m_lTouchDevices; @@ -150,7 +149,7 @@ class CInputManager { void newTabletTool(wlr_input_device*); void newTabletPad(wlr_input_device*); void focusTablet(STablet*, wlr_tablet_tool*, bool motion = false); - void newIdleInhibitor(wlr_idle_inhibitor_v1*); + void newIdleInhibitor(std::any); void recheckIdleInhibitorStatus(); void onSwipeBegin(wlr_pointer_swipe_begin_event*); @@ -201,6 +200,7 @@ class CInputManager { // Listeners struct { CHyprSignalListener setCursorShape; + CHyprSignalListener newIdleInhibitor; } m_sListeners; bool m_bCursorImageOverridden = false; @@ -237,6 +237,14 @@ class CInputManager { // for releasing mouse buttons std::list<uint32_t> m_lCurrentlyHeldButtons; + // idle inhibitors + struct SIdleInhibitor { + std::shared_ptr<CIdleInhibitor> inhibitor; + CWindow* pWindow = nullptr; + CHyprSignalListener windowDestroyListener; + }; + std::vector<std::unique_ptr<SIdleInhibitor>> m_vIdleInhibitors; + // swipe void beginWorkspaceSwipe(); void updateWorkspaceSwipe(double); |
