summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorVaxry <vaxry@vaxry.net>2024-11-09 02:34:04 +0000
committerVaxry <vaxry@vaxry.net>2024-11-09 02:34:04 +0000
commitcca227a53e10b9101d2fbcfb99e6360b416d7168 (patch)
tree84d74e2e738f364eb6a36396bace9de8be444cb1 /src
parentb9c439a55e5ecef563657da211bc10ddc3273a1c (diff)
tablet: use inputMgr unified naming scheme
ref #8301
Diffstat (limited to 'src')
-rw-r--r--src/desktop/LayerSurface.cpp7
-rw-r--r--src/managers/input/Tablets.cpp6
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<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;
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<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
}
@@ -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
}
@@ -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
}