[PATCH weston 08/19] input: clean up update_keymap a little

Jonas Ådahl jadahl at gmail.com
Wed Jul 1 01:52:56 PDT 2015


On Wed, Jun 03, 2015 at 03:53:27PM -0500, Derek Foreman wrote:
> We already have a pointer to the keyboard, so we can change all
> seat->keyboard to keyboard.
> 
> Signed-off-by: Derek Foreman <derekf at osg.samsung.com>

Reviewed-by: Jonas Ådahl <jadahl at gmail.com>

> ---
>  src/input.c | 12 ++++++------
>  1 file changed, 6 insertions(+), 6 deletions(-)
> 
> diff --git a/src/input.c b/src/input.c
> index 8350d22..f8f19f7 100644
> --- a/src/input.c
> +++ b/src/input.c
> @@ -1276,9 +1276,9 @@ update_keymap(struct weston_seat *seat)
>  	xkb_state_unref(keyboard->xkb_state.state);
>  	keyboard->xkb_state.state = state;
>  
> -	wl_resource_for_each(resource, &seat->keyboard->resource_list)
> +	wl_resource_for_each(resource, &keyboard->resource_list)
>  		send_keymap(resource, xkb_info);
> -	wl_resource_for_each(resource, &seat->keyboard->focus_resource_list)
> +	wl_resource_for_each(resource, &keyboard->focus_resource_list)
>  		send_keymap(resource, xkb_info);
>  
>  	notify_modifiers(seat, wl_display_next_serial(seat->compositor->wl_display));
> @@ -1286,10 +1286,10 @@ update_keymap(struct weston_seat *seat)
>  	if (!latched_mods && !locked_mods)
>  		return;
>  
> -	wl_resource_for_each(resource, &seat->keyboard->resource_list)
> -		send_modifiers(resource, wl_display_get_serial(seat->compositor->wl_display), seat->keyboard);
> -	wl_resource_for_each(resource, &seat->keyboard->focus_resource_list)
> -		send_modifiers(resource, wl_display_get_serial(seat->compositor->wl_display), seat->keyboard);
> +	wl_resource_for_each(resource, &keyboard->resource_list)
> +		send_modifiers(resource, wl_display_get_serial(seat->compositor->wl_display), keyboard);
> +	wl_resource_for_each(resource, &keyboard->focus_resource_list)
> +		send_modifiers(resource, wl_display_get_serial(seat->compositor->wl_display), keyboard);
>  }
>  #else
>  WL_EXPORT void
> -- 
> 2.1.4
> 
> _______________________________________________
> wayland-devel mailing list
> wayland-devel at lists.freedesktop.org
> http://lists.freedesktop.org/mailman/listinfo/wayland-devel


More information about the wayland-devel mailing list