Skip to content

steamcompmgr, OpenVRBackend: subtract the cursor hotspot on nested ba… - #2534

Open
matte-schwartz wants to merge 1 commit into
ValveSoftware:masterfrom
matte-schwartz:nested-cursor-hotspot
Open

matte-schwartz wants to merge 1 commit into
ValveSoftware:masterfrom
matte-schwartz:nested-cursor-hotspot

Conversation

@matte-schwartz

Copy link
Copy Markdown
Collaborator

…ckends again

12706c3 stopped subtracting the hotspot whenever the mouse connector has nested hints, so OpenVR could read the layer offset back as the pointer position. The nested Wayland and SDL backends composite that same layer when gamescope draws the cursor itself, as with --force-grab-cursor, and the drawn cursor now sits a hotspot down and right of where clicks land.

Always place the layer by its top-left corner as every other consumer expects, and have OpenVR add the hotspot back when it turns the layer into a pointer position for its cursor override.

Closes: #2529

…ckends again

12706c3 stopped subtracting the hotspot whenever the mouse connector has
nested hints, so OpenVR could read the layer offset back as the pointer
position. The nested Wayland and SDL backends composite that same layer
when gamescope draws the cursor itself, as with --force-grab-cursor, and
the drawn cursor now sits a hotspot down and right of where clicks land.

Always place the layer by its top-left corner as every other consumer
expects, and have OpenVR add the hotspot back when it turns the layer
into a pointer position for its cursor override.

Closes: ValveSoftware#2529
KogasaPls added a commit to KogasaPls/gamescope that referenced this pull request Nov 3, 2026
…ckends

12706c3 stopped subtracting the hotspot on every nested backend, so the
composited cursor is offset by its hotspot under --force-grab-cursor
(ValveSoftware#2529). OpenVR positions its overlay from the hotspot, so it adds the
hotspot back when it turns the cursor layer into a pointer position.

Patch-Name: nested-cursor-hotspot
Patch-Kind: fix
Patch-Source: ValveSoftware#2534 (matte-schwartz)
Patch-Issues: ValveSoftware#2529
Patch-Summary: Place the composited cursor by its top-left corner on nested
 backends again, so it lines up with the pointer under --force-grab-cursor.
 OpenVR adds the hotspot back for its cursor overlay position.
KogasaPls added a commit to KogasaPls/gamescope that referenced this pull request Nov 3, 2026
…ckends

12706c3 stopped subtracting the hotspot on every nested backend, so the
composited cursor is offset by its hotspot under --force-grab-cursor
(ValveSoftware#2529). OpenVR positions its overlay from the hotspot, so it adds the
hotspot back when it turns the cursor layer into a pointer position.

Patch-Name: nested-cursor-hotspot
Patch-Kind: fix
Patch-Source: ValveSoftware#2534 (matte-schwartz)
Patch-Issues: ValveSoftware#2529
Patch-Summary: Place the composited cursor by its top-left corner on nested
 backends again, so it lines up with the pointer under --force-grab-cursor.
 OpenVR adds the hotspot back for its cursor overlay position.
KogasaPls added a commit to KogasaPls/gamescope that referenced this pull request Nov 4, 2026
…ckends

12706c3 stopped subtracting the hotspot on every nested backend, so the
composited cursor is offset by its hotspot under --force-grab-cursor
(ValveSoftware#2529). OpenVR positions its overlay from the hotspot, so it adds the
hotspot back when it turns the cursor layer into a pointer position.

Patch-Name: nested-cursor-hotspot
Patch-Kind: fix
Patch-Source: ValveSoftware#2534 (matte-schwartz)
Patch-Issues: ValveSoftware#2529
Patch-Summary: Place the composited cursor by its top-left corner on nested
 backends again, so it lines up with the pointer under --force-grab-cursor.
 OpenVR adds the hotspot back for its cursor overlay position.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

[Regression] 3.17.0: cursor offset with --force-grab-cursor; without it, camera snaps to the ground on right click (FFXIV via Proton, Wayland)

1 participant