Fix wrong layout name in hyprland language module when a variant is used
This commit is contained in:
parent
bfbb2f9a40
commit
f724cc3f9d
|
@ -2,6 +2,7 @@
|
||||||
*~
|
*~
|
||||||
vgcore.*
|
vgcore.*
|
||||||
/.vscode
|
/.vscode
|
||||||
|
/.idea
|
||||||
/.cache
|
/.cache
|
||||||
*.swp
|
*.swp
|
||||||
packagecache
|
packagecache
|
||||||
|
|
|
@ -49,9 +49,8 @@ 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_);
|
||||||
auto layoutName = ev.substr(ev.find_last_of(',') + 1);
|
auto kbName = ev.substr(ev.find_last_of('>') + 1, ev.find_first_of(','));
|
||||||
auto kbName = ev.substr(0, ev.find_last_of(','));
|
auto layoutName = ev.substr(ev.find_first_of(',') + 1);
|
||||||
kbName = kbName.substr(kbName.find_first_of('>') + 2);
|
|
||||||
|
|
||||||
if (config_.isMember("keyboard-name") && kbName != config_["keyboard-name"].asString())
|
if (config_.isMember("keyboard-name") && kbName != config_["keyboard-name"].asString())
|
||||||
return; // ignore
|
return; // ignore
|
||||||
|
|
Loading…
Reference in New Issue