Skip to content

Restore X11 root cursor on desktop reveal to prevent transparent cursor over XWayland apps (#14561) - #14580

Merged
ryanrhughes merged 2 commits into
omacom:quattrofrom
Sebo1411:fix/issue-14561-xwayland-cursor
Nov 1, 2026
Merged

ryanrhughes merged 2 commits into
omacom:quattrofrom
Sebo1411:fix/issue-14561-xwayland-cursor

Conversation

@Sebo1411

@Sebo1411 Sebo1411 commented Oct 8, 2026 •

Copy link
Copy Markdown
Contributor

Closes #14561

Problem

Omarchy initializes the compositor with a transparent startup cursor (omarchy-startup) to avoid cursor flicker during boot and theme loading. When XWayland initializes under Hyprland, it inherits this environment and sets the blank cursor as the X11 root cursor. When the desktop reveals via omarchy_startup_cursor_restore(), hyprctl setcursor restores Wayland cursors, but XWayland's default root cursor remains transparent for X11 applications that do not set an explicit client cursor.

Solution

  • Call xsetroot -cursor_name left_ptr >/dev/null 2>&1 || true via hl.exec_cmd() during omarchy_startup_cursor_restore(true) to reset the X11 root cursor once the desktop reveals.
  • Add xorg-xsetroot to base packages and migration for existing installs.
  • Updated test/shell.d/hyprland-startup-cursor-test.sh to assert dispatch of xsetroot alongside the Hyprcursor restoration.

@greptile-apps

greptile-apps Bot commented Oct 8, 2026 •

Copy link
Copy Markdown
Contributor

RetriggerView in GreptileConfidence Score: 5/5

[Medium impact] The PR appears safe to merge; no blocking issues remain.

Summary

Restores the X11 root cursor when the desktop appears.

  • The desktop reveal restores the X11 cursor for apps that use the root cursor.

The earlier missing-dependency findings are addressed. No new actionable issues were found in the rename.

Reviews (7) · Last reviewed commit: "Run the xsetroot migration after the new..." · Reviewed by Greptile

Comment thread default/hypr/startup-cursor.lua Resolved
Comment thread default/hypr/startup-cursor.lua Resolved
Comment thread default/hypr/startup-cursor.lua Resolved
@Sebo1411

Copy link
Copy Markdown
Contributor Author

@greptile review

@whelanh

whelanh commented Oct 15, 2026

Copy link
Copy Markdown

This should be merged. It is very annoying to have to run xsetroot -cursor_name left_ptr every time you want to use a X11 app.

@omarchybot omarchybot added bug Something isn't working verified Omarchy Triage has verified that this issue is ready for final review ready Good to merge labels Oct 16, 2026
@omarchybot

Copy link
Copy Markdown
Collaborator

Reviewed at 72f51e5 and verified on a disposable Omarchy worker. Nothing found that needs changing.

Reproduced. After a cold login, I mapped a plain X11 window that sets no cursor of its own, put the pointer over it, and read the cursor XWayland was showing with XFixesGetCursorImage:

Tests on the worker: ./test/cli, hyprland-startup-cursor-test.sh, platform-packages-test.sh, preinstalls-test.sh and image-target-platform-test.sh pass. The updated cursor test fails when the xsetroot line is removed, so it does check the fix. The migration ran twice against a temporary home without complaint. hyprland-startup-cursor-cold-test.sh could not start its nested compositor on the worker, and fails the same way on quattro, so it says nothing either way about this change.

Read: the new line is in the one branch every reveal goes through (the normal reveal, the 15s recovery timer and the reload recover path), outside the Hyprcursor condition, so users with Hyprcursor off get it too. By then the compositor environment already has the user's XCURSOR_THEME back. If XWayland only becomes ready after the reveal, Hyprland sets the root cursor from the theme that is loaded by then, so that order is fine too. The migration's timestamp is older than the newest one on quattro, which does no harm: omarchy-migrate checks every file for its own marker.

Other open pull requests on this file: #14818 and #14922 fix different startup-cursor problems and never touch the X11 root cursor. #14842 carries this branch's commit inside its own larger change. This is the earliest fix for #14561.

Codex Medium gave a second opinion and found no defects. Comparing the diffs of #14818, #14842 and #14922, it reached the same conclusion about them. It can read this session's notes, so treat that as agreement, not an independent check.

Nothing is needed from you. This is waiting on the maintainer.

…or over XWayland apps (omacom#14561)

- Reset the X11 root cursor via xsetroot during omarchy_startup_cursor_restore(true)
- Add xorg-xsetroot to base packages and migration for existing installs
- Update startup cursor test coverage
@Sebo1411
Sebo1411 force-pushed the fix/issue-14561-xwayland-cursor branch from 72f51e5 to 98b09dd Compare October 30, 2026 17:44
@omarchybot omarchybot removed verified Omarchy Triage has verified that this issue is ready for final review ready Good to merge labels Oct 31, 2026
1791835389 sorted before migrations already on quattro and v4-5-0. Renamed with a fresh timestamp so it runs in order on both branches.
@ryanrhughes
ryanrhughes merged commit 8e74d36 into omacom:quattro Nov 1, 2026
3 checks passed
ryanrhughes added a commit that referenced this pull request Nov 1, 2026
…or over XWayland apps (#14561) (#14580)

* Restore X11 root cursor on desktop reveal to prevent transparent cursor over XWayland apps (#14561)

- Reset the X11 root cursor via xsetroot during omarchy_startup_cursor_restore(true)
- Add xorg-xsetroot to base packages and migration for existing installs
- Update startup cursor test coverage

* Run the xsetroot migration after the newest quattro and 4.5 migrations

1791835389 sorted before migrations already on quattro and v4-5-0. Renamed with a fresh timestamp so it runs in order on both branches.

---------

Co-authored-by: Ryan Hughes <[email protected]>
(cherry picked from commit 8e74d36)
omarchybot added a commit to yamz8/omarchy that referenced this pull request Nov 2, 2026
omacom#14580 resets the XWayland root cursor in restore(true). Here that call moves into the 600 ms reveal, after the user's cursor settings are back, so the root cursor is reset at the same point in the reveal as on quattro.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
@emirb emirb added this to the 4.5 milestone Nov 5, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

bug Something isn't working

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Dev: XWayland default cursor remains transparent over X11 apps; xsetroot restores it

5 participants