tablet: use inputMgr unified naming scheme

ref #8301
This commit is contained in:
Vaxry 2024-11-09 02:34:04 +00:00
parent b9c439a55e
commit cca227a53e
2 changed files with 8 additions and 5 deletions

View file

@ -326,7 +326,10 @@ void CLayerSurface::onCommit() {
[&WASLASTFOCUS](SP<CWLSurfaceResource> surf, const Vector2D& offset, void* data) { WASLASTFOCUS = WASLASTFOCUS || g_pSeatManager->state.keyboardFocus == surf; }, [&WASLASTFOCUS](SP<CWLSurfaceResource> surf, const Vector2D& offset, void* data) { WASLASTFOCUS = WASLASTFOCUS || g_pSeatManager->state.keyboardFocus == surf; },
nullptr); nullptr);
if (!WASLASTFOCUS && popupHead) { if (!WASLASTFOCUS && popupHead) {
popupHead->breadthfirst([&WASLASTFOCUS](CPopup* popup, void* data) { WASLASTFOCUS = WASLASTFOCUS || (popup->m_pWLSurface && g_pSeatManager->state.keyboardFocus == popup->m_pWLSurface->resource()); }, popupHead->breadthfirst(
[&WASLASTFOCUS](CPopup* popup, void* data) {
WASLASTFOCUS = WASLASTFOCUS || (popup->m_pWLSurface && g_pSeatManager->state.keyboardFocus == popup->m_pWLSurface->resource());
},
nullptr); nullptr);
} }
const bool WASEXCLUSIVE = interactivity == ZWLR_LAYER_SURFACE_V1_KEYBOARD_INTERACTIVITY_EXCLUSIVE; const bool WASEXCLUSIVE = interactivity == ZWLR_LAYER_SURFACE_V1_KEYBOARD_INTERACTIVITY_EXCLUSIVE;

View file

@ -201,7 +201,7 @@ void CInputManager::newTablet(SP<Aquamarine::ITablet> pDevice) {
m_vHIDs.push_back(PNEWTABLET); m_vHIDs.push_back(PNEWTABLET);
try { try {
PNEWTABLET->hlName = deviceNameToInternalString(pDevice->getName()); PNEWTABLET->hlName = g_pInputManager->getNameForNewDevice(pDevice->getName());
} catch (std::exception& e) { } catch (std::exception& e) {
Debug::log(ERR, "Tablet had no name???"); // logic error Debug::log(ERR, "Tablet had no name???"); // logic error
} }
@ -229,7 +229,7 @@ SP<CTabletTool> CInputManager::ensureTabletToolPresent(SP<Aquamarine::ITabletToo
m_vHIDs.push_back(PTOOL); m_vHIDs.push_back(PTOOL);
try { try {
PTOOL->hlName = deviceNameToInternalString(pTool->getName()); PTOOL->hlName = g_pInputManager->getNameForNewDevice(pTool->getName());
} catch (std::exception& e) { } catch (std::exception& e) {
Debug::log(ERR, "Tablet had no name???"); // logic error Debug::log(ERR, "Tablet had no name???"); // logic error
} }
@ -249,7 +249,7 @@ void CInputManager::newTabletPad(SP<Aquamarine::ITabletPad> pDevice) {
m_vHIDs.push_back(PNEWPAD); m_vHIDs.push_back(PNEWPAD);
try { try {
PNEWPAD->hlName = deviceNameToInternalString(pDevice->getName()); PNEWPAD->hlName = g_pInputManager->getNameForNewDevice(pDevice->getName());
} catch (std::exception& e) { } catch (std::exception& e) {
Debug::log(ERR, "Pad had no name???"); // logic error Debug::log(ERR, "Pad had no name???"); // logic error
} }