mirror of
https://chromium.googlesource.com/crosvm/crosvm
synced 2024-11-24 20:48:55 +00:00
bb95fc4512
Added preliminary version of keyboard and pointing device routine for wayland implementation. The pointing input is wired as a multi touch device. Due to the fact that wayland client is callback based, all the necessary incoming events are serialized and stashed in the temp circular buffer and then processed afterwards from the main event loop. Known issues: 1. Mouse input can't be properly wired inside the guest as a mouse device without pointer locking, but this is not what we want. The approach emulates it as a multitouch device, but, of course, it implies limitations in functionality. Limitations include cursor in the VM that doesn't move in unison with the host cursor. 2. I kept the mouse cursor surface since it's not decided yet which approach for handling pointing input device will be used (see #1). Removing the mouse surface in the guest would remove the lagging guest cursor. The alternatives to the multi-touch device are: "- Relative mice (e.g. a typical PC mouse). These are relative devices, meaning they send deltas from the current cursor position. Some apps like games rely on these events. - Touchscreens (multitouch, single touch). These are absolute devices, and are much easier to implement seamless guest/host input for. - Touchpads (these are absolute devices). I'm not sure these are really compelling for any use case." -nkgold@ 3. This code is for POC purpose only, so there are still lot of minor issues and negligence in it. Looking forward for your comments and proposals. BUG=b:177939148 TEST=crosvm $ARGS \ --display-window-keyboard \ --display-window-mouse \ --gpu=3d,glx=false,egl=true \ --wayland-sock=/run/user/1000/wayland-0 \ $OTHER_ARGS Change-Id: If4a9b73b8da4e0cc52fa619bbd6e5588ccdb7874 Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/crosvm/+/2688439 Commit-Queue: Gurchetan Singh <gurchetansingh@chromium.org> Tested-by: kokoro <noreply+kokoro@google.com> Reviewed-by: Zach Reizner <zachr@chromium.org> |
||
---|---|---|
.. | ||
src | ||
Cargo.toml |