From: Phil Dennis-Jordan <phil@philjordan.eu>
To: qemu-devel@nongnu.org
Cc: peter.maydell@linaro.org, philmd@linaro.org,
marcandre.lureau@redhat.com, akihiko.odaki@daynix.com,
lists@philjordan.eu, Phil Dennis-Jordan <phil@philjordan.eu>
Subject: [PATCH v2 0/2] ui/cocoa: Adds native absolute pointer support
Date: Tue, 25 Jun 2024 15:49:29 +0200 [thread overview]
Message-ID: <20240625134931.92279-1-phil@philjordan.eu> (raw)
This change implements passing guest cursors through to the native
Cocoa host NSCursor on macOS when using absolute pointing device
input.
The first pass at this was based purely on NSCursor, which drew
some criticism due to the somewhat complex nature of the code which
was required to generate correct relative pointer input events
after teleporting the host cursor.
This new version builds on Akihiko Odaki's work implementing CALayer
based cursors. We retain CALayer for compositing cursors when the
input is relative and the pointer thus completely captured by the
guest. When using absolute positioning of the pointer, we use the
fully host-integrated NSCursor, with no offsetting or teleporting
needed.
The first patch consists of a few reference counting fixes to the
existing CALayer patch, the second implements the NSCursor logic
and switches between CALayer and NSCursor depending on whether
relative or absolute input is used.
Based-on: <20240318-cursor-v1-2-0bbe6c382217@daynix.com>
Phil Dennis-Jordan (2):
ui/cocoa: Minor fixes to CALayer based cursors
ui/cocoa: Adds NSCursor absolute pointer support
ui/cocoa.m | 93 +++++++++++++++++++++++++++++++++++++++++++-----------
1 file changed, 75 insertions(+), 18 deletions(-)
--
2.39.3 (Apple Git-146)
next reply other threads:[~2024-06-25 13:50 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2024-06-25 13:49 Phil Dennis-Jordan [this message]
2024-06-25 13:49 ` [PATCH v2 1/2] ui/cocoa: Minor fixes to CALayer based cursors Phil Dennis-Jordan
2024-06-25 13:49 ` [PATCH v2 2/2] ui/cocoa: Adds NSCursor absolute pointer support Phil Dennis-Jordan
2024-06-27 11:48 ` Akihiko Odaki
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=20240625134931.92279-1-phil@philjordan.eu \
--to=phil@philjordan.eu \
--cc=akihiko.odaki@daynix.com \
--cc=lists@philjordan.eu \
--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).