This series of loosely related changes provides some minor improvements
in mouse cursor usability.

 1. This one-liner changes alpha downsampling when using a UI frontend
    which does not support alpha-blended mouse cursors. Previously,
    any pixel with an alpha value other than 255 was treated as fully
    transparent in this context. This looks pretty bad when the guest
    OS uses anti-aliased cursors. (e.g. macOS) This occurs with some
    VNC clients, for example.
 2. This change has nothing to do with cursors: there are two
    functionally identical implementations of an int_clamp() inline
    function in the Qemu codebase. This unifies them in the shared
    cutils.h header, as I'm about to use it in a third location in
    patch number 3.
 3. This sizeable patch implements cursor support in the (macOS) Cocoa
    UI frontend. This fixes the issue of no mouse pointer showing up
    when using virtio-vga on a macOS host, for example.
    It unfortunately introduces some complexity to the mouse movement
    event handling when using a relative pointing device in the guest,
    as teleporting the cursor on the host offsets the next mouse event
    delta by a corresponding amount. We therefore need to track this
    offset and counteract it when processing the event. For details,
    see the commit message and inline comments.

This work was sponsored by Sauce Labs Inc.

Phil Dennis-Jordan (3):
  Cursor: 8 -> 1 bit alpha downsampling improvement
  hw: Moves int_clamp() implementations to header
  ui/cocoa: Adds support for mouse cursors

 hw/input/hid.c        |  12 +--
 hw/usb/dev-wacom.c    |  11 +--
 include/qemu/cutils.h |  11 +++
 ui/cocoa.m            | 167 +++++++++++++++++++++++++++++++++++++++++-
 ui/cursor.c           |   2 +-
 ui/trace-events       |   7 ++
 6 files changed, 185 insertions(+), 25 deletions(-)

-- 
2.36.1


Reply via email to