qemu-devel.nongnu.org archive mirror
 help / color / mirror / Atom feed
* [PATCH 0/3] Mouse cursor improvements on macOS and VNC
@ 2024-06-08 20:20 Phil Dennis-Jordan
  2024-06-08 20:20 ` [PATCH 1/3] Cursor: 8 -> 1 bit alpha downsampling improvement Phil Dennis-Jordan
                   ` (2 more replies)
  0 siblings, 3 replies; 12+ messages in thread
From: Phil Dennis-Jordan @ 2024-06-08 20:20 UTC (permalink / raw)
  To: qemu-devel
  Cc: peter.maydell, philmd, akihiko.odaki, marcandre.lureau,
	Phil Dennis-Jordan

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



^ permalink raw reply	[flat|nested] 12+ messages in thread

end of thread, other threads:[~2024-06-25 20:15 UTC | newest]

Thread overview: 12+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2024-06-08 20:20 [PATCH 0/3] Mouse cursor improvements on macOS and VNC Phil Dennis-Jordan
2024-06-08 20:20 ` [PATCH 1/3] Cursor: 8 -> 1 bit alpha downsampling improvement Phil Dennis-Jordan
2024-06-09  8:52   ` Akihiko Odaki
2024-06-08 20:20 ` [PATCH 2/3] hw: Moves int_clamp() implementations to header Phil Dennis-Jordan
2024-06-09  8:59   ` Akihiko Odaki
2024-06-10  8:50     ` Phil Dennis-Jordan
2024-06-10  8:54       ` Akihiko Odaki
2024-06-08 20:20 ` [PATCH 3/3] ui/cocoa: Adds support for mouse cursors Phil Dennis-Jordan
2024-06-09  9:06   ` Akihiko Odaki
2024-06-10 14:00     ` Phil Dennis-Jordan
2024-06-11  7:35       ` Akihiko Odaki
2024-06-25 18:57         ` Phil Dennis-Jordan

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).