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: Derek Foreman <derekf@osg.samsung.com>
Reviewed-by: Bryce Harrington <bryce@osg.samsung.com>
dev
Derek Foreman 10 years ago committed by Bryce Harrington
parent 345c9f366f
commit 244e99e18c
  1. 18
      src/input.c

@ -1138,19 +1138,19 @@ notify_modifiers(struct weston_seat *seat, uint32_t serial)
group = xkb_state_serialize_layout(keyboard->xkb_state.state, group = xkb_state_serialize_layout(keyboard->xkb_state.state,
XKB_STATE_LAYOUT_EFFECTIVE); XKB_STATE_LAYOUT_EFFECTIVE);
if (mods_depressed != seat->keyboard->modifiers.mods_depressed || if (mods_depressed != keyboard->modifiers.mods_depressed ||
mods_latched != seat->keyboard->modifiers.mods_latched || mods_latched != keyboard->modifiers.mods_latched ||
mods_locked != seat->keyboard->modifiers.mods_locked || mods_locked != keyboard->modifiers.mods_locked ||
group != seat->keyboard->modifiers.group) group != keyboard->modifiers.group)
changed = 1; changed = 1;
run_modifier_bindings(seat, seat->keyboard->modifiers.mods_depressed, run_modifier_bindings(seat, keyboard->modifiers.mods_depressed,
mods_depressed); mods_depressed);
seat->keyboard->modifiers.mods_depressed = mods_depressed; keyboard->modifiers.mods_depressed = mods_depressed;
seat->keyboard->modifiers.mods_latched = mods_latched; keyboard->modifiers.mods_latched = mods_latched;
seat->keyboard->modifiers.mods_locked = mods_locked; keyboard->modifiers.mods_locked = mods_locked;
seat->keyboard->modifiers.group = group; keyboard->modifiers.group = group;
/* And update the modifier_state for bindings. */ /* And update the modifier_state for bindings. */
mods_lookup = mods_depressed | mods_latched; mods_lookup = mods_depressed | mods_latched;

Loading…
Cancel
Save