GNOME Bugzilla – Bug 726199
evdev changes needed for logind integration work
Last modified: 2014-03-13 16:47:12 UTC
See patches.
Created attachment 271644 [details] [review] evdev: Extend the device open callback with a close callback as well We need to return the device to logind with ReleaseDevice().
Created attachment 271645 [details] [review] evdev: Set the initial pointer position for all pointer devices Rather than just those on the main seat.
Created attachment 271646 [details] [review] evdev: Extract code for setting the libinput seat out We're going to create the main seat at an earlier time, when we don't have the physical libinput_seat yet, so we need to do the association later.
Created attachment 271647 [details] [review] evdev: Always create the main seat There could be times when we may not necessarily see a device appear at initialization time, like when we're VT switched away when we initialize, and thus we can't ever rely on a main seat appearing. Always create a main seat with logical pointer/keyboard devices, and tie the first physical seat that comes in to the main seat.
Review of attachment 271644 [details] [review]: ::: clutter/evdev/clutter-device-manager-evdev.c @@ +1478,3 @@ */ void +clutter_evdev_set_open_callback (ClutterOpenDeviceCallback open_callback_, this should be renamed to something like: clutter_evdev_set_device_callbacks() given that it's not for setting an open callback any more. ::: clutter/evdev/clutter-evdev.h @@ +49,3 @@ gpointer user_data, GError **error); +typedef void (*ClutterCloseDeviceCallback) (int fd, should the CloseDeviceCallback also get the path? maybe for error reporting?
Review of attachment 271645 [details] [review]: okay.
Review of attachment 271646 [details] [review]: okay.
Review of attachment 271647 [details] [review]: okay.
(In reply to comment #6) > this should be renamed to something like: > > clutter_evdev_set_device_callbacks() OK. > should the CloseDeviceCallback also get the path? maybe for error reporting? libinput doesn't give us a path, so I'm not sure how we'd find it. Call fstat and construct it out of device major/minor numbers somehow?
(In reply to comment #10) > > should the CloseDeviceCallback also get the path? maybe for error reporting? > > libinput doesn't give us a path, so I'm not sure how we'd find it. Call fstat > and construct it out of device major/minor numbers somehow? if there's no path available, then it's fine not to expose it.
Created attachment 271650 [details] [review] evdev: Extend the device open callback with a close callback as well We need to return the device to logind with ReleaseDevice().
Review of attachment 271650 [details] [review]: looks good.
Attachment 271645 [details] pushed as 5facd71 - evdev: Set the initial pointer position for all pointer devices Attachment 271646 [details] pushed as defe55f - evdev: Extract code for setting the libinput seat out Attachment 271647 [details] pushed as dcaf568 - evdev: Always create the main seat Attachment 271650 [details] pushed as e23f77f - evdev: Extend the device open callback with a close callback as well