diff options
author | Pekka Paalanen <ppaalanen@gmail.com> | 2012-01-05 16:41:21 +0200 |
---|---|---|
committer | Pekka Paalanen <ppaalanen@gmail.com> | 2012-01-05 16:50:00 +0200 |
commit | b07876d23a929faa5c61d9180810fedc0fcaeb51 (patch) | |
tree | 90c07263aa006d7dbfcb7e5b97f42a56a05985f1 /src/evdev.c | |
parent | c0444e3ad69728ea0792234d60550f77d8820f2e (diff) |
evdev: warn about missing input devices
Usually there should be at least one input device, when Weston starts
up, or is reactivated by a VT switch. Add a nice warning, in case there
are no input devices.
This is to give a clue to users who happen to try Weston on DRM, and
do not get any response.
Add also a message to another failure case, that may lead to missing
input devices.
Signed-off-by: Pekka Paalanen <ppaalanen@gmail.com>
Diffstat (limited to 'src/evdev.c')
-rw-r--r-- | src/evdev.c | 14 |
1 files changed, 13 insertions, 1 deletions
diff --git a/src/evdev.c b/src/evdev.c index 0b2fdfa..39e04d8 100644 --- a/src/evdev.c +++ b/src/evdev.c @@ -545,6 +545,16 @@ evdev_add_devices(struct udev *udev, struct weston_input_device *input_base) udev_device_unref(device); } udev_enumerate_unref(e); + + if (wl_list_empty(&input->devices_list)) { + fprintf(stderr, + "warning: no input devices on entering Weston. " + "Possible causes:\n" + "\t- no permissions to read /dev/input/evdev*\n" + "\t- seats misconfigured " + "(Weston backend option 'seat', " + "udev device property ID_SEAT)\n"); + } } static int @@ -581,8 +591,10 @@ evdev_config_udev_monitor(struct udev *udev, struct evdev_input *master) struct weston_compositor *c = master->base.compositor; master->udev_monitor = udev_monitor_new_from_netlink(udev, "udev"); - if (!master->udev_monitor) + if (!master->udev_monitor) { + fprintf(stderr, "udev: failed to create the udev monitor\n"); return 0; + } udev_monitor_filter_add_match_subsystem_devtype(master->udev_monitor, "input", NULL); |