aboutsummaryrefslogtreecommitdiffhomepage
diff options
context:
space:
mode:
authorvaxerski <[email protected]>2022-06-09 19:40:16 +0200
committervaxerski <[email protected]>2022-06-09 19:40:16 +0200
commit506977c13d118feedffb7b7fc10d5b16e5400f78 (patch)
treeec97643d033b364ff5c904d8986c844b2facb50d
parent09b130374df035188b34a36e55d6fdda935c7df8 (diff)
downloadHyprland-506977c13d118feedffb7b7fc10d5b16e5400f78.tar.gz
Hyprland-506977c13d118feedffb7b7fc10d5b16e5400f78.zip
unfocus on destroy
-rw-r--r--src/managers/input/Tablets.cpp6
1 files changed, 6 insertions, 0 deletions
diff --git a/src/managers/input/Tablets.cpp b/src/managers/input/Tablets.cpp
index 5029ac45..bb2c5c6d 100644
--- a/src/managers/input/Tablets.cpp
+++ b/src/managers/input/Tablets.cpp
@@ -16,6 +16,8 @@ void CInputManager::newTabletTool(wlr_input_device* pDevice) {
PNEWTABLET->hyprListener_Destroy.initCallback(&pDevice->events.destroy, [](void* owner, void* data) {
const auto PTAB = (STablet*)owner;
+ g_pInputManager->unfocusAllTablets();
+
g_pInputManager->m_lTablets.remove(*PTAB);
Debug::log(LOG, "Removed a tablet");
@@ -133,6 +135,8 @@ STabletTool* CInputManager::ensureTabletToolPresent(wlr_tablet_tool* pTool) {
PTOOL->hyprListener_TabletToolDestroy.initCallback(&pTool->events.destroy, [](void* owner, void* data) {
const auto PTOOL = (STabletTool*)owner;
+ g_pInputManager->unfocusAllTablets();
+
PTOOL->wlrTabletTool->data = nullptr;
g_pInputManager->m_lTabletTools.remove(*PTOOL);
}, PTOOL, "Tablet Tool V1");
@@ -192,6 +196,8 @@ void CInputManager::newTabletPad(wlr_input_device* pDevice) {
const auto PPAD = (STabletPad*)owner;
+ g_pInputManager->unfocusAllTablets();
+
g_pInputManager->m_lTabletPads.remove(*PPAD);
Debug::log(LOG, "Removed a tablet pad");