~eliasnaur/gio-patches

This thread contains a patchset. You're looking at the original emails, but you may wish to use the patch review UI. Review patch
2 2

[PATCH gio] app: [Wayland] scale pointer hotspot coordinates

Details
Message ID
<20220630203005.664130-1-christopher.waldon.dev@gmail.com>
DKIM signature
pass
Download raw message
Patch: +1 -1
This commit updates the way that we change cursors so that the
hotspot of the cursor is properly set to surface-local coordinates.
The previous raw hotspot coordinates are relative to the cursor
image buffer data, and do not take the buffer's scaling factor
into account.

Signed-off-by: Chris Waldon <christopher.waldon.dev@gmail.com>
---
 app/os_wayland.go | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/app/os_wayland.go b/app/os_wayland.go
index dc5da440..69c5ced4 100644
--- a/app/os_wayland.go
+++ b/app/os_wayland.go
@@ -1143,7 +1143,7 @@ func (w *window) setCursor(pointer *C.struct_wl_pointer, serial C.uint32_t) {
	if buf == nil {
		return
	}
	C.wl_pointer_set_cursor(pointer, serial, w.cursor.surf, C.int32_t(img.hotspot_x), C.int32_t(img.hotspot_y))
	C.wl_pointer_set_cursor(pointer, serial, w.cursor.surf, C.int32_t(img.hotspot_x/C.uint(w.scale)), C.int32_t(img.hotspot_y/C.uint(w.scale)))
	C.wl_surface_attach(w.cursor.surf, buf, 0, 0)
	C.wl_surface_damage(w.cursor.surf, 0, 0, C.int32_t(img.width), C.int32_t(img.height))
	C.wl_surface_commit(w.cursor.surf)
-- 
2.36.1

[gio/patches] build success

builds.sr.ht <builds@sr.ht>
Details
Message ID
<CL3RKDCJJ3OX.M94CHEQMPZ61@cirno>
In-Reply-To
<20220630203005.664130-1-christopher.waldon.dev@gmail.com> (view parent)
DKIM signature
missing
Download raw message
gio/patches: SUCCESS in 19m59s

[app: [Wayland] scale pointer hotspot coordinates][0] from [Chris Waldon][1]

[0]: https://lists.sr.ht/~eliasnaur/gio-patches/patches/33421
[1]: christopher.waldon.dev@gmail.com

✓ #791586 SUCCESS gio/patches/linux.yml   https://builds.sr.ht/~eliasnaur/job/791586
✓ #791585 SUCCESS gio/patches/freebsd.yml https://builds.sr.ht/~eliasnaur/job/791585
✓ #791587 SUCCESS gio/patches/openbsd.yml https://builds.sr.ht/~eliasnaur/job/791587
✓ #791584 SUCCESS gio/patches/apple.yml   https://builds.sr.ht/~eliasnaur/job/791584
Details
Message ID
<CL439C63W5WX.2ZKWRQ21JBQCC@themachine>
In-Reply-To
<20220630203005.664130-1-christopher.waldon.dev@gmail.com> (view parent)
DKIM signature
pass
Download raw message
Thanks, merged.

Elias
Reply to thread Export thread (mbox)