inputmgr: clean lists in ~dtor

ref #3558
This commit is contained in:
Vaxry 2023-11-12 14:03:46 +00:00
parent 65efde32c9
commit 47d46aa56c
2 changed files with 20 additions and 3 deletions

View file

@ -3,6 +3,18 @@
#include "wlr/types/wlr_switch.h" #include "wlr/types/wlr_switch.h"
#include <ranges> #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) { void CInputManager::onMouseMoved(wlr_pointer_motion_event* e) {
static auto* const PSENS = &g_pConfigManager->getConfigValuePtr("general:sensitivity")->floatValue; static auto* const PSENS = &g_pConfigManager->getConfigValuePtr("general:sensitivity")->floatValue;
static auto* const PNOACCEL = &g_pConfigManager->getConfigValuePtr("input:force_no_accel")->intValue; static auto* const PNOACCEL = &g_pConfigManager->getConfigValuePtr("input:force_no_accel")->intValue;

View file

@ -7,12 +7,14 @@
#include "../../helpers/Timer.hpp" #include "../../helpers/Timer.hpp"
#include "InputMethodRelay.hpp" #include "InputMethodRelay.hpp"
enum eClickBehaviorMode { enum eClickBehaviorMode
{
CLICKMODE_DEFAULT = 0, CLICKMODE_DEFAULT = 0,
CLICKMODE_KILL CLICKMODE_KILL
}; };
enum eMouseBindMode { enum eMouseBindMode
{
MBIND_INVALID = -1, MBIND_INVALID = -1,
MBIND_MOVE = 0, MBIND_MOVE = 0,
MBIND_RESIZE = 1, MBIND_RESIZE = 1,
@ -20,7 +22,8 @@ enum eMouseBindMode {
MBIND_RESIZE_FORCE_RATIO = 3 MBIND_RESIZE_FORCE_RATIO = 3
}; };
enum eBorderIconDirection { enum eBorderIconDirection
{
BORDERICON_NONE, BORDERICON_NONE,
BORDERICON_UP, BORDERICON_UP,
BORDERICON_DOWN, BORDERICON_DOWN,
@ -61,6 +64,8 @@ class CKeybindManager;
class CInputManager { class CInputManager {
public: public:
~CInputManager();
void onMouseMoved(wlr_pointer_motion_event*); void onMouseMoved(wlr_pointer_motion_event*);
void onMouseWarp(wlr_pointer_motion_absolute_event*); void onMouseWarp(wlr_pointer_motion_absolute_event*);
void onMouseButton(wlr_pointer_button_event*); void onMouseButton(wlr_pointer_button_event*);