wayland: unify key- and mouse-binding structs

This commit is contained in:
Daniel Eklöf 2022-02-07 19:41:33 +01:00
parent d04bc6ab10
commit dcd79065c8
No known key found for this signature in database
GPG key ID: 5BBD4992C116573F
5 changed files with 47 additions and 37 deletions

View file

@ -125,7 +125,7 @@ urls_input(struct seat *seat, struct terminal *term, uint32_t key,
const struct key_binding *bind = &it->item;
/* Match translated symbol */
if (bind->sym == sym &&
if (bind->k.sym == sym &&
bind->mods == (mods & ~consumed))
{
execute_binding(seat, term, bind->action, serial);
@ -136,14 +136,14 @@ urls_input(struct seat *seat, struct terminal *term, uint32_t key,
continue;
for (size_t i = 0; i < raw_count; i++) {
if (bind->sym == raw_syms[i]) {
if (bind->k.sym == raw_syms[i]) {
execute_binding(seat, term, bind->action, serial);
return;
}
}
/* Match raw key code */
tll_foreach(bind->key_codes, code) {
tll_foreach(bind->k.key_codes, code) {
if (code->item == key) {
execute_binding(seat, term, bind->action, serial);
return;