aboutsummaryrefslogtreecommitdiffhomepage
path: root/src/managers/input/Tablets.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/managers/input/Tablets.cpp')
-rw-r--r--src/managers/input/Tablets.cpp16
1 files changed, 0 insertions, 16 deletions
diff --git a/src/managers/input/Tablets.cpp b/src/managers/input/Tablets.cpp
index 3977fc94..c33f021c 100644
--- a/src/managers/input/Tablets.cpp
+++ b/src/managers/input/Tablets.cpp
@@ -16,8 +16,6 @@ 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");
@@ -96,7 +94,6 @@ void CInputManager::newTabletTool(wlr_input_device* pDevice) {
PNEWTABLET->hyprListener_Button.initCallback(&pDevice->tablet->events.button, [](void* owner, void* data) {
const auto EVENT = (wlr_tablet_tool_button_event*)data;
- const auto PTAB = (STablet*)owner;
const auto PTOOL = g_pInputManager->ensureTabletToolPresent(EVENT->tool);
@@ -141,8 +138,6 @@ 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");
@@ -202,8 +197,6 @@ 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");
@@ -233,13 +226,4 @@ void CInputManager::focusTablet(STablet* pTab, wlr_tablet_tool* pTool, bool moti
if (PTOOL->pSurface)
wlr_tablet_v2_tablet_tool_notify_proximity_out(PTOOL->wlrTabletToolV2);
}
-}
-
-void CInputManager::unfocusAllTablets() {
- for (auto& tt : m_lTabletTools) {
- if (!tt.wlrTabletToolV2 || !tt.pSurface || !tt.active)
- continue;
-
- wlr_tablet_v2_tablet_tool_notify_proximity_out(tt.wlrTabletToolV2);
- }
} \ No newline at end of file