Merge pull request #4068 from Rimsoo/patch-1
Fixed one layout with multiple variant bug hyprland/language Fixes #3676
This commit is contained in:
@ -66,7 +66,11 @@ auto Language::update() -> void {
|
|||||||
void Language::onEvent(const std::string& ev) {
|
void Language::onEvent(const std::string& ev) {
|
||||||
std::lock_guard<std::mutex> lg(mutex_);
|
std::lock_guard<std::mutex> lg(mutex_);
|
||||||
std::string kbName(begin(ev) + ev.find_last_of('>') + 1, begin(ev) + ev.find_first_of(','));
|
std::string kbName(begin(ev) + ev.find_last_of('>') + 1, begin(ev) + ev.find_first_of(','));
|
||||||
auto layoutName = ev.substr(ev.find_last_of(',') + 1);
|
|
||||||
|
// Last comma before variants parenthesis, eg:
|
||||||
|
// activelayout>>micro-star-int'l-co.,-ltd.-msi-gk50-elite-gaming-keyboard,English (US, intl., with dead keys)
|
||||||
|
std::string beforParenthesis(begin(ev), begin(ev) + ev.find_last_of('('));
|
||||||
|
auto layoutName = ev.substr(beforParenthesis.find_last_of(',') + 1);
|
||||||
|
|
||||||
if (config_.isMember("keyboard-name") && kbName != config_["keyboard-name"].asString())
|
if (config_.isMember("keyboard-name") && kbName != config_["keyboard-name"].asString())
|
||||||
return; // ignore
|
return; // ignore
|
||||||
|
Reference in New Issue
Block a user