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();