From a8e2ecbcd7cb7bbc0328c8d28c937d9d995695f8 Mon Sep 17 00:00:00 2001 From: pixl Date: Fri, 21 Aug 2020 21:46:33 -0400 Subject: [PATCH] Add HiresScroll destructor --- src/logid/features/HiresScroll.cpp | 5 +++++ src/logid/features/HiresScroll.h | 1 + 2 files changed, 6 insertions(+) diff --git a/src/logid/features/HiresScroll.cpp b/src/logid/features/HiresScroll.cpp index 92a6e5d..720f994 100644 --- a/src/logid/features/HiresScroll.cpp +++ b/src/logid/features/HiresScroll.cpp @@ -61,6 +61,11 @@ HiresScroll::HiresScroll(Device *dev) : DeviceFeature(dev), _config(dev) _last_scroll = std::chrono::system_clock::now(); } +HiresScroll::~HiresScroll() +{ + _device->hidpp20().removeEventHandler(MOVE_EVENTHANDLER_NAME); +} + void HiresScroll::configure() { auto mode = _hires_scroll->getMode(); diff --git a/src/logid/features/HiresScroll.h b/src/logid/features/HiresScroll.h index 782b26f..7cc2f67 100644 --- a/src/logid/features/HiresScroll.h +++ b/src/logid/features/HiresScroll.h @@ -29,6 +29,7 @@ namespace features { public: explicit HiresScroll(Device* dev); + ~HiresScroll(); virtual void configure(); virtual void listen();