mirror of
https://github.com/hyprwm/Hypr.git
synced 2024-11-24 06:15:57 +01:00
fix bitwise operation order in IGNOREDMOD
This commit is contained in:
parent
3518e3ba8a
commit
1667180ac3
2 changed files with 2 additions and 2 deletions
|
@ -10,7 +10,7 @@ Keybind* KeybindManager::findKeybindByKey(int mod, xcb_keysym_t keysym) {
|
||||||
const auto IGNOREMODMASK = KeybindManager::modToMask(ConfigManager::getString("ignore_mod"));
|
const auto IGNOREMODMASK = KeybindManager::modToMask(ConfigManager::getString("ignore_mod"));
|
||||||
|
|
||||||
for(auto& key : KeybindManager::keybinds) {
|
for(auto& key : KeybindManager::keybinds) {
|
||||||
if (keysym == key.getKeysym() && (mod == key.getMod() || mod == key.getMod() | IGNOREMODMASK)) {
|
if (keysym == key.getKeysym() && (mod == key.getMod() || (mod == (key.getMod() | IGNOREMODMASK)))) {
|
||||||
return &key;
|
return &key;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -780,7 +780,7 @@ void Events::eventKeyPress(xcb_generic_event_t* event) {
|
||||||
const auto IGNOREDMOD = KeybindManager::modToMask(ConfigManager::getString("ignore_mod"));
|
const auto IGNOREDMOD = KeybindManager::modToMask(ConfigManager::getString("ignore_mod"));
|
||||||
|
|
||||||
for (auto& keybind : KeybindManager::keybinds) {
|
for (auto& keybind : KeybindManager::keybinds) {
|
||||||
if (keybind.getKeysym() != 0 && keybind.getKeysym() == KEYSYM && (keybind.getMod() == E->state || keybind.getMod() | IGNOREDMOD == E->state)) {
|
if (keybind.getKeysym() != 0 && keybind.getKeysym() == KEYSYM && (keybind.getMod() == E->state || ((keybind.getMod() | IGNOREDMOD) == E->state))) {
|
||||||
keybind.getDispatcher()(keybind.getCommand());
|
keybind.getDispatcher()(keybind.getCommand());
|
||||||
return;
|
return;
|
||||||
// TODO: fix duplicating keybinds
|
// TODO: fix duplicating keybinds
|
||||||
|
|
Loading…
Reference in a new issue