aboutsummaryrefslogtreecommitdiffhomepage
diff options
context:
space:
mode:
authorVaxry <[email protected]>2023-11-12 14:03:46 +0000
committerVaxry <[email protected]>2023-11-12 14:03:46 +0000
commit47d46aa56cc9c0c853401275bbe920e902f7d5e6 (patch)
tree3891e8a5f2c874f4e5321505ebe8d9a79a245f5d
parent65efde32c99b8119d3c55729508b92801b60cc13 (diff)
downloadHyprland-47d46aa56cc9c0c853401275bbe920e902f7d5e6.tar.gz
Hyprland-47d46aa56cc9c0c853401275bbe920e902f7d5e6.zip
inputmgr: clean lists in ~dtor
ref #3558
-rw-r--r--src/managers/input/InputManager.cpp12
-rw-r--r--src/managers/input/InputManager.hpp11
2 files changed, 20 insertions, 3 deletions
diff --git a/src/managers/input/InputManager.cpp b/src/managers/input/InputManager.cpp
index d096ab32..2dba7515 100644
--- a/src/managers/input/InputManager.cpp
+++ b/src/managers/input/InputManager.cpp
@@ -3,6 +3,18 @@
#include "wlr/types/wlr_switch.h"
#include <ranges>
+CInputManager::~CInputManager() {
+ m_lConstraints.clear();
+ m_lKeyboards.clear();
+ m_lMice.clear();
+ m_lTablets.clear();
+ m_lTabletTools.clear();
+ m_lTabletPads.clear();
+ m_lIdleInhibitors.clear();
+ m_lTouchDevices.clear();
+ m_lSwitches.clear();
+}
+
void CInputManager::onMouseMoved(wlr_pointer_motion_event* e) {
static auto* const PSENS = &g_pConfigManager->getConfigValuePtr("general:sensitivity")->floatValue;
static auto* const PNOACCEL = &g_pConfigManager->getConfigValuePtr("input:force_no_accel")->intValue;
diff --git a/src/managers/input/InputManager.hpp b/src/managers/input/InputManager.hpp
index 554f91db..b6d9d89c 100644
--- a/src/managers/input/InputManager.hpp
+++ b/src/managers/input/InputManager.hpp
@@ -7,12 +7,14 @@
#include "../../helpers/Timer.hpp"
#include "InputMethodRelay.hpp"
-enum eClickBehaviorMode {
+enum eClickBehaviorMode
+{
CLICKMODE_DEFAULT = 0,
CLICKMODE_KILL
};
-enum eMouseBindMode {
+enum eMouseBindMode
+{
MBIND_INVALID = -1,
MBIND_MOVE = 0,
MBIND_RESIZE = 1,
@@ -20,7 +22,8 @@ enum eMouseBindMode {
MBIND_RESIZE_FORCE_RATIO = 3
};
-enum eBorderIconDirection {
+enum eBorderIconDirection
+{
BORDERICON_NONE,
BORDERICON_UP,
BORDERICON_DOWN,
@@ -61,6 +64,8 @@ class CKeybindManager;
class CInputManager {
public:
+ ~CInputManager();
+
void onMouseMoved(wlr_pointer_motion_event*);
void onMouseWarp(wlr_pointer_motion_absolute_event*);
void onMouseButton(wlr_pointer_button_event*);