Skip to content

Commit

Permalink
tablet: use inputMgr unified naming scheme
Browse files Browse the repository at this point in the history
ref #8301
  • Loading branch information
vaxerski committed Nov 9, 2024
1 parent b9c439a commit cca227a
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 5 deletions.
7 changes: 5 additions & 2 deletions src/desktop/LayerSurface.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -326,8 +326,11 @@ void CLayerSurface::onCommit() {
[&WASLASTFOCUS](SP<CWLSurfaceResource> 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;
Expand Down
6 changes: 3 additions & 3 deletions src/managers/input/Tablets.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -201,7 +201,7 @@ void CInputManager::newTablet(SP<Aquamarine::ITablet> 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
}
Expand Down Expand Up @@ -229,7 +229,7 @@ SP<CTabletTool> CInputManager::ensureTabletToolPresent(SP<Aquamarine::ITabletToo
m_vHIDs.push_back(PTOOL);

try {
PTOOL->hlName = deviceNameToInternalString(pTool->getName());
PTOOL->hlName = g_pInputManager->getNameForNewDevice(pTool->getName());
} catch (std::exception& e) {
Debug::log(ERR, "Tablet had no name???"); // logic error
}
Expand All @@ -249,7 +249,7 @@ void CInputManager::newTabletPad(SP<Aquamarine::ITabletPad> 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
}
Expand Down

0 comments on commit cca227a

Please sign in to comment.