Skip to content

fix(windows): restore cursor on mouse exit and window deactivation - #5

Merged
maddada merged 1 commit into
maddada:ghostexfrom
gvastethecreator:codex-windows-cursor-reentry
Sep 29, 2026
Merged

maddada merged 1 commit into
maddada:ghostexfrom
gvastethecreator:codex-windows-cursor-reentry

Conversation

@gvastethecreator

@gvastethecreator gvastethecreator commented Sep 29, 2026 •

Copy link
Copy Markdown

After the pointer was hidden while typing, mouse exit and window deactivation marked it visible without restoring the Win32 cursor. The next mouse move then skipped restoration, leaving the pointer invisible over Ghostex.

Call the existing restore_cursor_after_hide helper from both paths so the visibility flag and native cursor change together. This targets the ghostex branch and preserves its existing cursor and popup behavior.

Validation:

  • The Ghostex Windows release build passed with these changes, and the resulting executable was installed and its hash verified.
  • The user confirmed the pointer is visible again after the restart.
  • The matching Ghostex packaging patch passes reverse-apply verification against this source.
  • No new tests were added, per the Ghostex repository instructions. The release build and user verification used the existing local dependency checkout; this PR applies the same three cursor hunks to the current ghostex branch.

The README review notice is required by the dependency's local agent instructions.

Note

Fix Windows cursor restoration on mouse exit and window deactivation

Replaces direct cursor-visibility flag updates with the existing restore_cursor_after_hide helper in events.rs. Both WindowsWindowInner.handle_mouse_leave_msg and WindowsWindowInner.handle_activate_msg now restore the native Win32 cursor when the shared state says it was hidden, instead of only flipping the visibility flag.

Macroscope summarized 0e95a78.

@coderabbitai

coderabbitai Bot commented Sep 29, 2026

Copy link
Copy Markdown

Important

Review skipped

Auto reviews are disabled on base/target branches other than the default branch.

Please check the settings in the CodeRabbit UI or the .coderabbit.yaml file in this repository. To trigger a single review, invoke the @coderabbitai review command.

⚙️ Run configuration

Configuration used: defaults

Review profile: CHILL

Plan: Advanced

Run ID: 9a3f3789-0953-46cf-a43e-a79cd79eef13

You can disable this status message by setting the reviews.review_status to false in the CodeRabbit configuration file.

Use the checkbox below for a quick retry:

  • 🔍 Trigger review

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands.

@maddada
maddada merged commit 21b988c into maddada:ghostex Sep 29, 2026
29 checks passed
maddada added a commit to gvastethecreator/Ghostex that referenced this pull request Sep 29, 2026
maddada/zed#5 is merged; its PR commit also carried a stray README line,
removed on ghostex, so the pin moves to the ghostex head.
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.

2 participants