From: Phil Dennis-Jordan <phil@philjordan.eu>
To: qemu-devel@nongnu.org
Cc: peter.maydell@linaro.org, philmd@linaro.org,
akihiko.odaki@daynix.com, marcandre.lureau@redhat.com,
Phil Dennis-Jordan <phil@philjordan.eu>
Subject: [PATCH 0/3] Mouse cursor improvements on macOS and VNC
Date: Sat, 8 Jun 2024 22:20:42 +0200 [thread overview]
Message-ID: <20240608202045.2815-1-phil@philjordan.eu> (raw)
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
next reply other threads:[~2024-06-08 20:21 UTC|newest]
Thread overview: 12+ messages / expand[flat|nested] mbox.gz Atom feed top
2024-06-08 20:20 Phil Dennis-Jordan [this message]
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
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20240608202045.2815-1-phil@philjordan.eu \
--to=phil@philjordan.eu \
--cc=akihiko.odaki@daynix.com \
--cc=marcandre.lureau@redhat.com \
--cc=peter.maydell@linaro.org \
--cc=philmd@linaro.org \
--cc=qemu-devel@nongnu.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
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).