Skip to content

fix(native): draw the desktop's cursor on Wayland - #835

Merged
omartelo merged 1 commit into
mainfrom
fix/native-wayland-cursor
Oct 19, 2026
Merged

omartelo merged 1 commit into
mainfrom
fix/native-wayland-cursor

Conversation

@omartelo

Copy link
Copy Markdown
Collaborator

What

Bumps lichdotdev/gio (branch drop-event) to c389a6eb, which fixes two cursor bugs in the native window on Wayland, reported on niri with noctalia:

  • Wrong cursor theme. Gio drew the cursor itself from XCURSOR_THEME / XCURSOR_SIZE in its environment. niri keeps the theme in its own config, so lich fell back to the default xcursor theme. The window now sets its cursor through wp_cursor_shape_v1: it names a shape and the compositor draws it in its own theme, size and scale. niri and Hyprland both have the protocol.
  • Cursor jumping on a smaller monitor. The window starts at the largest scale of all outputs and loaded its cursor theme at that scale once. On an output with a smaller scale, the cursor kept the old images while hotspots were divided by the new scale, so it jumped as the pointer entered the window. Without cursor-shape-v1, the window now reloads the cursor theme when its scale changes.

Verification

  • native/: gofmt -l ., go vet ./... and go test ./... clean.
  • Tested by the reporter on niri across two monitors with different scales: the cursor matches the desktop and no longer jumps.
  • The Gio change is in the cgo Wayland boundary (app/os_wayland.go plus generated protocol code), with no unit test.

Bumps lichdotdev/gio to c389a6eb. The window now sets its cursor through
wp_cursor_shape_v1, so the compositor draws it in its own theme, size and
scale; niri keeps the theme in its config and never handed it to lich
through XCURSOR_THEME. Without the protocol, the window reloads its cursor
theme when its scale changes, which stops the cursor jumping on entering
the window from a monitor with a smaller scale than the largest one.
@omartelo
omartelo merged commit 160c93d into main Oct 19, 2026
10 checks passed
@omartelo
omartelo deleted the fix/native-wayland-cursor branch October 19, 2026 15:43
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.

1 participant