diff --git a/src/lib/deskflow/unix/AppUtilUnix.cpp b/src/lib/deskflow/unix/AppUtilUnix.cpp index e717c7554..226a18d0e 100644 --- a/src/lib/deskflow/unix/AppUtilUnix.cpp +++ b/src/lib/deskflow/unix/AppUtilUnix.cpp @@ -106,7 +106,7 @@ std::string AppUtilUnix::getCurrentLanguageCode() XkbStateRec state; XkbGetState(display, XkbUseCoreKbd, &state); - auto nedeedGroupIndex = static_cast(state.group); + auto neededGroupIndex = static_cast(state.group); size_t groupIdx = 0; size_t groupStartI = 0; @@ -118,7 +118,7 @@ std::string AppUtilUnix::getCurrentLanguageCode() if (auto group = rawLayouts.substr(groupStartI, strI - groupStartI); group.find("group", 0, 5) == std::string::npos && group.find("inet", 0, 4) == std::string::npos && group.find("pc", 0, 2) == std::string::npos) { - if (nedeedGroupIndex == groupIdx) { + if (neededGroupIndex == groupIdx) { result = group.substr(0, std::min(group.find('(', 0), group.find(':', 0))); break; } diff --git a/src/lib/platform/OSXKeyState.cpp b/src/lib/platform/OSXKeyState.cpp index 0dc2a1302..b05d07a01 100644 --- a/src/lib/platform/OSXKeyState.cpp +++ b/src/lib/platform/OSXKeyState.cpp @@ -867,18 +867,18 @@ void OSXKeyState::setGroup(int32_t group) { TISInputSourceRef keyboardLayout = (TISInputSourceRef)CFArrayGetValueAtIndex(m_groups.get(), group); if (!keyboardLayout) { - LOG_WARN("nedeed keyboard layout is null"); + LOG_WARN("needed keyboard layout is null"); return; } auto canBeSetted = (CFBooleanRef )TISGetInputSourceProperty(TISCopyCurrentKeyboardInputSource(), kTISPropertyInputSourceIsEnableCapable); if (!canBeSetted) { - LOG_WARN("nedeed keyboard layout is disabled for programmatically selection"); + LOG_WARN("needed keyboard layout is disabled for programmatically selection"); return; } if (TISSelectInputSource(keyboardLayout) != noErr) { - LOG_WARN("failed to set nedeed keyboard layout"); + LOG_WARN("failed to set needed keyboard layout"); } LOG_DEBUG1("keyboard layout change to %d", group); diff --git a/src/lib/platform/XWindowsKeyState.h b/src/lib/platform/XWindowsKeyState.h index c36853cf7..0aca0bfc4 100644 --- a/src/lib/platform/XWindowsKeyState.h +++ b/src/lib/platform/XWindowsKeyState.h @@ -108,7 +108,7 @@ private: //! Create and send language change request to \p group by DBus interface /*! - Returns the existance of nedeed DBus interface. + Returns the existence of needed DBus interface. */ bool setCurrentLanguageWithDBus(int32_t group) const;