mirror of
https://github.com/hyprwm/Hypr.git
synced 2024-12-25 02:39:49 +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"));
|
||||
|
||||
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;
|
||||
}
|
||||
}
|
||||
|
|
|
@ -780,7 +780,7 @@ void Events::eventKeyPress(xcb_generic_event_t* event) {
|
|||
const auto IGNOREDMOD = KeybindManager::modToMask(ConfigManager::getString("ignore_mod"));
|
||||
|
||||
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());
|
||||
return;
|
||||
// TODO: fix duplicating keybinds
|
||||
|
|
Loading…
Reference in a new issue