Commit 244e99e1 authored by Derek Foreman's avatar Derek Foreman Committed by Bryce Harrington

input: clean up notify_modifiers a little

We already have a pointer to the keyboard, so we can change all
seat->keyboard to keyboard.
Signed-off-by: default avatarDerek Foreman <derekf@osg.samsung.com>
Reviewed-by: default avatarBryce Harrington <bryce@osg.samsung.com>
parent 345c9f36
......@@ -1138,19 +1138,19 @@ notify_modifiers(struct weston_seat *seat, uint32_t serial)
group = xkb_state_serialize_layout(keyboard->xkb_state.state,
XKB_STATE_LAYOUT_EFFECTIVE);
if (mods_depressed != seat->keyboard->modifiers.mods_depressed ||
mods_latched != seat->keyboard->modifiers.mods_latched ||
mods_locked != seat->keyboard->modifiers.mods_locked ||
group != seat->keyboard->modifiers.group)
if (mods_depressed != keyboard->modifiers.mods_depressed ||
mods_latched != keyboard->modifiers.mods_latched ||
mods_locked != keyboard->modifiers.mods_locked ||
group != keyboard->modifiers.group)
changed = 1;
run_modifier_bindings(seat, seat->keyboard->modifiers.mods_depressed,
run_modifier_bindings(seat, keyboard->modifiers.mods_depressed,
mods_depressed);
seat->keyboard->modifiers.mods_depressed = mods_depressed;
seat->keyboard->modifiers.mods_latched = mods_latched;
seat->keyboard->modifiers.mods_locked = mods_locked;
seat->keyboard->modifiers.group = group;
keyboard->modifiers.mods_depressed = mods_depressed;
keyboard->modifiers.mods_latched = mods_latched;
keyboard->modifiers.mods_locked = mods_locked;
keyboard->modifiers.group = group;
/* And update the modifier_state for bindings. */
mods_lookup = mods_depressed | mods_latched;
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment