aboutsummaryrefslogtreecommitdiffhomepage
diff options
context:
space:
mode:
-rw-r--r--src/managers/input/InputManager.cpp4
-rw-r--r--src/managers/input/InputManager.hpp2
-rw-r--r--src/managers/input/Tablets.cpp16
3 files changed, 0 insertions, 22 deletions
diff --git a/src/managers/input/InputManager.cpp b/src/managers/input/InputManager.cpp
index 79d4f305..157ee9bb 100644
--- a/src/managers/input/InputManager.cpp
+++ b/src/managers/input/InputManager.cpp
@@ -2,8 +2,6 @@
#include "../../Compositor.hpp"
void CInputManager::onMouseMoved(wlr_pointer_motion_event* e) {
- unfocusAllTablets();
-
float sensitivity = g_pConfigManager->getFloat("general:sensitivity");
const auto DELTA = g_pConfigManager->getInt("input:force_no_accel") == 1 ? Vector2D(e->unaccel_dx, e->unaccel_dy) : Vector2D(e->delta_x, e->delta_y);
@@ -19,8 +17,6 @@ void CInputManager::onMouseMoved(wlr_pointer_motion_event* e) {
}
void CInputManager::onMouseWarp(wlr_pointer_motion_absolute_event* e) {
- unfocusAllTablets();
-
wlr_cursor_warp_absolute(g_pCompositor->m_sWLRCursor, &e->pointer->base, e->x, e->y);
mouseMoveUnified(e->time_msec);
diff --git a/src/managers/input/InputManager.hpp b/src/managers/input/InputManager.hpp
index 1cd99658..18d9857e 100644
--- a/src/managers/input/InputManager.hpp
+++ b/src/managers/input/InputManager.hpp
@@ -59,8 +59,6 @@ public:
void mouseMoveUnified(uint32_t, bool refocus = false);
STabletTool* ensureTabletToolPresent(wlr_tablet_tool*);
-
- void unfocusAllTablets();
};
inline std::unique_ptr<CInputManager> g_pInputManager; \ No newline at end of file
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