From dc7f52bdb76a8f3b3cf6260bc0d861758956991e Mon Sep 17 00:00:00 2001 From: Noah Gold Date: Sat, 1 Feb 2020 13:01:58 -0800 Subject: Use simple virtio_input_events where possible. Previously, all input events in CrosVM were required to be linux input_events, which have a timestamp field that is actually unused by when we send/receive from the guest which are of type virtio_input_event. This CL allows CrosVM to understand both types of input events in a first class manner. It is a follow up on https://chromium-review.googlesource.com/c/chromiumos/platform/crosvm/+/1930405. This CL also addresses some bugs with window driven input: 1. attach_event_device was being called before the surface was created, so the devices were never attached. 2. The default touchpad size was not being set to the display window size. Additionally, it removes the unused event "filter" feature on event sources. Breaking change: from this point forward, CrosVM will treat input events sent via a socket (e.g. SocketEventSource) to be virtio_input_events. BUG=None TEST=builds + manual Change-Id: I7fec07c582e5a071a6f116975ba70d6e621bb483 Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/crosvm/+/2034046 Reviewed-by: Zach Reizner Tested-by: kokoro Commit-Queue: Noah Gold --- src/crosvm.rs | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'src/crosvm.rs') diff --git a/src/crosvm.rs b/src/crosvm.rs index e0ddf06..2eead30 100644 --- a/src/crosvm.rs +++ b/src/crosvm.rs @@ -57,8 +57,8 @@ pub struct GidMap { pub count: u32, } -pub const DEFAULT_TOUCH_DEVICE_WIDTH: u32 = 800; -pub const DEFAULT_TOUCH_DEVICE_HEIGHT: u32 = 1280; +pub const DEFAULT_TOUCH_DEVICE_HEIGHT: u32 = 1024; +pub const DEFAULT_TOUCH_DEVICE_WIDTH: u32 = 1280; pub struct TouchDeviceOption { path: PathBuf, -- cgit 1.4.1