Hello,

I have the need to pass input events from a hypervisor host into a guest 
running weston.  I already have a custom protocol in weston to share surfaces 
with the host, and I'm hoping it makes sense to extend it to send input back to 
the guest.

So does it make sense to route these input events through libweston?  I've 
found the functions:  notify_key(), notify_button(), notify_motion_absolute(), 
etc.   I was trying to use these to inject the events but end up causing weston 
to segfault:

[22:14:37.440] caught signal: 11
[22:14:37.442]   [0000000000405c9a]  --  (weston)
[22:14:37.442]   [0000000000405d07]  --  (weston)
[22:14:37.444]   [00000034a0e34380]  --  (/lib/libc.so.6)
[22:14:37.446]   [00000034a321a380]  notify_button  (/usr/lib/libweston-3.so.0)
[22:14:37.447]   [00007ff73b747302]  --  (/usr/lib/libweston-3/drm-backend.so)
[22:14:37.449]   [00000034a1207477]  --  (/lib/libpthread.so.0)
[22:14:37.450]   [00000034a0ef23bf]  clone  (/lib/libc.so.6)

I suspect I don't have a valid weston_seat, which I get like this:

struct udev_seat *udev_seat = udev_seat_get_named(input, "default");
struct weston_seat *seat = &udev_seat->base;

Where "default" is the only existing seat in the list.  I didn't create or add 
any.

  1.  Is this the right approach?  Any hints on how to make it work?
  2.  One alternative I'm considering is to use uinput to create virtual input 
devices and send the events to that.  Any other alternatives that might be more 
appropriate than the above?

Thanks!
-JS
_______________________________________________
wayland-devel mailing list
[email protected]
https://lists.freedesktop.org/mailman/listinfo/wayland-devel

Reply via email to