When running an Android VM with GL support, Android somehow enforces
support for only touch events making it difficult to work with QEMU +
Android for devolpement / demo purposes without a touch screen.
This helper is useful for being able to emulate motion / click
events as touch ones
Set cursor to none (i.e., hide it) on init.
Otherwise, in cases where the define_cursor
signal is not received (e.g., atomic kms),
there are two cursors painted on the Widget
display.
Signed-off-by: Albert Esteve <aesteve@redhat.com>
Honestly, Qemu *probably* should be calling into us with the cursor after
we connect to get this right, but it doesn't which leaves the user with a
bit of an issue if there is no active cursor.
It's really annoying when a touchpad doesn't work at all in a MKS session.
So instead of doing nothing, at least try to send a wheel event so that
some amount of scroll may occur.
Eventually, we need a real touchpad D-Bus interface to deliver events.
This is a child widget to the MksDisplay which contains just the paintable
region of the remote screen. Doing so allows us to avoid having to handle
crossing events carefully for things like cursors.
Instead, now the MksDisplay calculates the area for the picture and
allocates it there. The MksDisplayPicture will always snapshot the
paintable using the full area it has been allocated.
Event processing can also largely move into the Picture widget which
simplifies bounds checking.