From cca227a53e10b9101d2fbcfb99e6360b416d7168 Mon Sep 17 00:00:00 2001 From: Vaxry Date: Sat, 9 Nov 2024 02:34:04 +0000 Subject: [PATCH] tablet: use inputMgr unified naming scheme ref #8301 --- src/desktop/LayerSurface.cpp | 7 +++++-- src/managers/input/Tablets.cpp | 6 +++--- 2 files changed, 8 insertions(+), 5 deletions(-) diff --git a/src/desktop/LayerSurface.cpp b/src/desktop/LayerSurface.cpp index 31c2482a..cd1c4742 100644 --- a/src/desktop/LayerSurface.cpp +++ b/src/desktop/LayerSurface.cpp @@ -326,8 +326,11 @@ void CLayerSurface::onCommit() { [&WASLASTFOCUS](SP surf, const Vector2D& offset, void* data) { WASLASTFOCUS = WASLASTFOCUS || g_pSeatManager->state.keyboardFocus == surf; }, nullptr); if (!WASLASTFOCUS && popupHead) { - popupHead->breadthfirst([&WASLASTFOCUS](CPopup* popup, void* data) { WASLASTFOCUS = WASLASTFOCUS || (popup->m_pWLSurface && g_pSeatManager->state.keyboardFocus == popup->m_pWLSurface->resource()); }, - nullptr); + popupHead->breadthfirst( + [&WASLASTFOCUS](CPopup* popup, void* data) { + WASLASTFOCUS = WASLASTFOCUS || (popup->m_pWLSurface && g_pSeatManager->state.keyboardFocus == popup->m_pWLSurface->resource()); + }, + nullptr); } const bool WASEXCLUSIVE = interactivity == ZWLR_LAYER_SURFACE_V1_KEYBOARD_INTERACTIVITY_EXCLUSIVE; const bool ISEXCLUSIVE = layerSurface->current.interactivity == ZWLR_LAYER_SURFACE_V1_KEYBOARD_INTERACTIVITY_EXCLUSIVE; diff --git a/src/managers/input/Tablets.cpp b/src/managers/input/Tablets.cpp index 3884afec..36bd5636 100644 --- a/src/managers/input/Tablets.cpp +++ b/src/managers/input/Tablets.cpp @@ -201,7 +201,7 @@ void CInputManager::newTablet(SP pDevice) { m_vHIDs.push_back(PNEWTABLET); try { - PNEWTABLET->hlName = deviceNameToInternalString(pDevice->getName()); + PNEWTABLET->hlName = g_pInputManager->getNameForNewDevice(pDevice->getName()); } catch (std::exception& e) { Debug::log(ERR, "Tablet had no name???"); // logic error } @@ -229,7 +229,7 @@ SP CInputManager::ensureTabletToolPresent(SPhlName = deviceNameToInternalString(pTool->getName()); + PTOOL->hlName = g_pInputManager->getNameForNewDevice(pTool->getName()); } catch (std::exception& e) { Debug::log(ERR, "Tablet had no name???"); // logic error } @@ -249,7 +249,7 @@ void CInputManager::newTabletPad(SP pDevice) { m_vHIDs.push_back(PNEWPAD); try { - PNEWPAD->hlName = deviceNameToInternalString(pDevice->getName()); + PNEWPAD->hlName = g_pInputManager->getNameForNewDevice(pDevice->getName()); } catch (std::exception& e) { Debug::log(ERR, "Pad had no name???"); // logic error }