mirror of
https://github.com/hyprwm/Hyprland.git
synced 2025-08-04 06:01:56 -07:00
@@ -785,6 +785,10 @@ void CInputManager::setupKeyboard(SP<IKeyboard> keeb) {
|
|||||||
keeb->events.destroy.registerStaticListener(
|
keeb->events.destroy.registerStaticListener(
|
||||||
[this](void* owner, std::any data) {
|
[this](void* owner, std::any data) {
|
||||||
auto PKEEB = ((IKeyboard*)owner)->self.lock();
|
auto PKEEB = ((IKeyboard*)owner)->self.lock();
|
||||||
|
|
||||||
|
if (!PKEEB)
|
||||||
|
return;
|
||||||
|
|
||||||
destroyKeyboard(PKEEB);
|
destroyKeyboard(PKEEB);
|
||||||
Debug::log(LOG, "Destroyed keyboard {:x}", (uintptr_t)owner);
|
Debug::log(LOG, "Destroyed keyboard {:x}", (uintptr_t)owner);
|
||||||
},
|
},
|
||||||
@@ -995,6 +999,10 @@ void CInputManager::setupMouse(SP<IPointer> mauz) {
|
|||||||
mauz->events.destroy.registerStaticListener(
|
mauz->events.destroy.registerStaticListener(
|
||||||
[this](void* mouse, std::any data) {
|
[this](void* mouse, std::any data) {
|
||||||
const auto PMOUSE = (IPointer*)mouse;
|
const auto PMOUSE = (IPointer*)mouse;
|
||||||
|
|
||||||
|
if (!PMOUSE)
|
||||||
|
return;
|
||||||
|
|
||||||
destroyPointer(PMOUSE->self.lock());
|
destroyPointer(PMOUSE->self.lock());
|
||||||
},
|
},
|
||||||
mauz.get());
|
mauz.get());
|
||||||
@@ -1384,6 +1392,10 @@ void CInputManager::newTouchDevice(wlr_input_device* pDevice) {
|
|||||||
PNEWDEV->events.destroy.registerStaticListener(
|
PNEWDEV->events.destroy.registerStaticListener(
|
||||||
[this](void* owner, std::any data) {
|
[this](void* owner, std::any data) {
|
||||||
auto PDEV = ((ITouch*)owner)->self.lock();
|
auto PDEV = ((ITouch*)owner)->self.lock();
|
||||||
|
|
||||||
|
if (!PDEV)
|
||||||
|
return;
|
||||||
|
|
||||||
destroyTouchDevice(PDEV);
|
destroyTouchDevice(PDEV);
|
||||||
},
|
},
|
||||||
PNEWDEV.get());
|
PNEWDEV.get());
|
||||||
|
Reference in New Issue
Block a user