core: remove CSeatManager::getActiveKbLayoutName

This commit is contained in:
Heorhi Valakhanovich 2025-04-11 15:27:45 +03:00
parent 2597a94c07
commit 8ea3fc4256
2 changed files with 0 additions and 20 deletions

View file

@ -134,25 +134,6 @@ void CSeatManager::registerCursorShape(SP<CCWpCursorShapeManagerV1> shape) {
m_pCursorShape = makeUnique<CCursorShape>(shape);
}
std::string CSeatManager::getActiveKbLayoutName() {
if (!m_pXKBState || !m_pXKBKeymap)
return "error";
const auto LAYOUTSNUM = xkb_keymap_num_layouts(m_pXKBKeymap);
for (uint32_t i = 0; i < LAYOUTSNUM; ++i) {
if (xkb_state_layout_index_is_active(m_pXKBState, i, XKB_STATE_LAYOUT_EFFECTIVE) == 1) {
const auto LAYOUTNAME = xkb_keymap_layout_get_name(m_pXKBKeymap, i);
if (LAYOUTNAME)
return std::string{LAYOUTNAME};
return "error";
}
}
return "none";
}
bool CSeatManager::registered() {
return m_pSeat;
}

View file

@ -14,7 +14,6 @@ class CSeatManager {
void registerSeat(SP<CCWlSeat> seat);
void registerCursorShape(SP<CCWpCursorShapeManagerV1> shape);
bool registered();
std::string getActiveKbLayoutName();
SP<CCWlKeyboard> m_pKeeb;
SP<CCWlPointer> m_pPointer;