[PATCH weston 4/4] udev-seat: Repick seat after a new device was added
Kristian Høgsberg
hoegsberg at gmail.com
Mon Oct 21 22:55:32 CEST 2013
On Thu, Oct 17, 2013 at 11:04:08PM +0200, Jonas Ådahl wrote:
> Signed-off-by: Jonas Ådahl <jadahl at gmail.com>
> ---
> src/input.c | 2 +-
> src/udev-seat.c | 5 +++++
> src/udev-seat.h | 1 +
> 3 files changed, 7 insertions(+), 1 deletion(-)
Great series, thanks Jonas. Happy to see the seat caps ref-counted
and happy that it fixes 69778. All committed.
Kristian
> diff --git a/src/input.c b/src/input.c
> index 0a4568b..afa4459 100644
> --- a/src/input.c
> +++ b/src/input.c
> @@ -45,7 +45,7 @@ static void unbind_resource(struct wl_resource *resource)
> wl_list_remove(wl_resource_get_link(resource));
> }
>
> -void
> +WL_EXPORT void
> weston_seat_repick(struct weston_seat *seat)
> {
> const struct weston_pointer *pointer = seat->pointer;
> diff --git a/src/udev-seat.c b/src/udev-seat.c
> index 4ef7ff3..ffaf08a 100644
> --- a/src/udev-seat.c
> +++ b/src/udev-seat.c
> @@ -128,6 +128,9 @@ device_added(struct udev_device *udev_device, struct udev_input *input)
> device->output = output;
> }
>
> + if (input->enabled == 1)
> + weston_seat_repick(&seat->base);
> +
> return 0;
> }
>
> @@ -263,6 +266,8 @@ udev_input_enable(struct udev_input *input, struct udev *udev)
> if (udev_input_add_devices(input, udev) < 0)
> return -1;
>
> + input->enabled = 1;
> +
> return 0;
> }
>
> diff --git a/src/udev-seat.h b/src/udev-seat.h
> index 5bf7caa..4cb6f07 100644
> --- a/src/udev-seat.h
> +++ b/src/udev-seat.h
> @@ -39,6 +39,7 @@ struct udev_input {
> struct wl_event_source *udev_monitor_source;
> char *seat_id;
> struct weston_compositor *compositor;
> + int enabled;
> };
>
>
> --
> 1.8.1.2
>
> _______________________________________________
> 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