udev-seat: Repick seat after a new device was added
authorJonas Ådahl <jadahl@gmail.com>
Thu, 17 Oct 2013 21:04:08 +0000 (23:04 +0200)
committerJonas Ådahl <jadahl@gmail.com>
Sat, 16 Nov 2013 20:54:07 +0000 (21:54 +0100)
Signed-off-by: Jonas Ådahl <jadahl@gmail.com>
src/udev-seat.c
src/udev-seat.h

index 4ef7ff3..ffaf08a 100644 (file)
@@ -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;
 }
 
index 5bf7caa..4cb6f07 100644 (file)
@@ -39,6 +39,7 @@ struct udev_input {
        struct wl_event_source *udev_monitor_source;
        char *seat_id;
        struct weston_compositor *compositor;
+       int enabled;
 };