Split weston_seat_init up into pointer/keyboard/touch

So we don't unnecessarily advertise interfaces the seat doesn't support.

Signed-off-by: Daniel Stone <daniel@fooishbar.org>
This commit is contained in:
Daniel Stone 2012-05-30 16:32:02 +01:00 committed by Jonas Ådahl
parent 36dbbb086c
commit 619215f6ce

View file

@ -440,6 +440,14 @@ evdev_configure_device(struct evdev_input_device *device)
if (has_abs && !has_key)
return -1;
if ((device->caps &
(EVDEV_MOTION_ABS | EVDEV_MOTION_REL | EVDEV_BUTTON)))
weston_seat_init_pointer(&device->master->base);
if ((device->caps & EVDEV_KEYBOARD))
weston_seat_init_keyboard(&device->master->base);
if ((device->caps & EVDEV_TOUCH))
weston_seat_init_touch(&device->master->base);
return 0;
}