[PATCH weston 1/4] input: Split get_udev_seat() into its own function
Bryce Harrington
bryce at osg.samsung.com
Wed Oct 14 15:59:08 PDT 2015
On Wed, Sep 30, 2015 at 10:43:57AM +0800, Jonas Ådahl wrote:
> On Tue, May 05, 2015 at 03:01:51PM -0500, Derek Foreman wrote:
> > We're going to need this on device removal in the future, so pull it out
> > into a separate function now.
> >
> > Signed-off-by: Derek Foreman <derekf at osg.samsung.com>
>
> Reviewed-by: Jonas Ådahl <jadahl at gmail.com>
Thanks, pushed:
remote: I: patch #48592 updated using rev a6714fa0faf7515585fd436faa5411dd71382186
remote: I: 1 patch(es) updated to state Accepted.
To ssh://git.freedesktop.org/git/wayland/weston
61b4d3e..a6714fa master -> master
> > ---/libinput-seat.c | 17 ++++++++++++-----
> > 1 file changed, 12 insertions(+), 5 deletions(-)
> >
> > diff --git a/src/libinput-seat.c b/src/libinput-seat.c
> > index 3ac0183..19116ec 100644
> > --- a/src/libinput-seat.c
> > +++ b/src/libinput-seat.c
> > @@ -45,24 +45,31 @@ udev_seat_create(struct udev_input *input, const char *seat_name);
> > static void
> > udev_seat_destroy(struct udev_seat *seat);
> >
> > +static struct udev_seat *
> > +get_udev_seat(struct udev_input *input, struct libinput_device *device)
> > +{
> > + struct libinput_seat *libinput_seat;
> > + const char *seat_name;
> > +
> > + libinput_seat = libinput_device_get_seat(device);
> > + seat_name = libinput_seat_get_logical_name(libinput_seat);
> > + return udev_seat_get_named(input, seat_name);
> > +}
> > +
> > static void
> > device_added(struct udev_input *input, struct libinput_device *libinput_device)
> > {
> > struct weston_compositor *c;
> > struct evdev_device *device;
> > struct weston_output *output;
> > - const char *seat_name;
> > const char *output_name;
> > - struct libinput_seat *libinput_seat;
> > struct weston_seat *seat;
> > struct udev_seat *udev_seat;
> > struct weston_pointer *pointer;
> >
> > c = input->compositor;
> > - libinput_seat = libinput_device_get_seat(libinput_device);
> >
> > - seat_name = libinput_seat_get_logical_name(libinput_seat);
> > - udev_seat = udev_seat_get_named(input, seat_name);
> > + udev_seat = get_udev_seat(input, libinput_device);
> > if (!udev_seat)
> > return;
> >
> > --
> > 2.1.4
> >
> > _______________________________________________
> > wayland-devel mailing list
> > wayland-devel at lists.freedesktop.org
> > http://lists.freedesktop.org/mailman/listinfo/wayland-devel
> _______________________________________________
> 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