udev-seat: Repick seat after a new device was added
Signed-off-by: Jonas Ådahl <jadahl@gmail.com>
This commit is contained in:
committed by
Kristian Høgsberg
parent
a493274442
commit
3042ffe011
+1
-1
@@ -45,7 +45,7 @@ static void unbind_resource(struct wl_resource *resource)
|
|||||||
wl_list_remove(wl_resource_get_link(resource));
|
wl_list_remove(wl_resource_get_link(resource));
|
||||||
}
|
}
|
||||||
|
|
||||||
void
|
WL_EXPORT void
|
||||||
weston_seat_repick(struct weston_seat *seat)
|
weston_seat_repick(struct weston_seat *seat)
|
||||||
{
|
{
|
||||||
const struct weston_pointer *pointer = seat->pointer;
|
const struct weston_pointer *pointer = seat->pointer;
|
||||||
|
|||||||
@@ -128,6 +128,9 @@ device_added(struct udev_device *udev_device, struct udev_input *input)
|
|||||||
device->output = output;
|
device->output = output;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if (input->enabled == 1)
|
||||||
|
weston_seat_repick(&seat->base);
|
||||||
|
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -263,6 +266,8 @@ udev_input_enable(struct udev_input *input, struct udev *udev)
|
|||||||
if (udev_input_add_devices(input, udev) < 0)
|
if (udev_input_add_devices(input, udev) < 0)
|
||||||
return -1;
|
return -1;
|
||||||
|
|
||||||
|
input->enabled = 1;
|
||||||
|
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -39,6 +39,7 @@ struct udev_input {
|
|||||||
struct wl_event_source *udev_monitor_source;
|
struct wl_event_source *udev_monitor_source;
|
||||||
char *seat_id;
|
char *seat_id;
|
||||||
struct weston_compositor *compositor;
|
struct weston_compositor *compositor;
|
||||||
|
int enabled;
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user