[Windows] Floating pet becomes click-through: WS_EX_LAYERED breaks hit testing; workaround and A/B evidence
Nobody has claimed this yet.
- Dominant language
- Rust
- Stars
- 125k
- Forks
- 19.4k
- PR merge metrics
- PR metrics pending
Description
What version of the Codex App are you using (From “About Codex” dialog)?
Codex Desktop package: 26.901.6511.0
What subscription do you have?
Plus
What platform is your computer?
Windows 11
What issue are you seeing?
On Windows, the Codex floating pet can remain fully visible while becoming click-through. Physical mouse clicks and drags are delivered to the desktop or window underneath instead of to the pet, so the pet cannot be clicked or moved.
This affects both a custom V2 pet and built-in Codex pets. The failure is correlated with WS_EX_LAYERED remaining enabled on the pet HWND: removing that one extended-window style immediately restores clicking and dragging; restoring it makes the pet click-through again.
What steps can reproduce the bug?
- Run Codex Desktop on Windows and select either a built-in pet or a custom V2 pet.
- Wake the floating pet and leave it visible.
- When the issue occurs, click or drag the visible pet.
- The click is delivered to the desktop or window underneath; the pet receives no pointer-down event and cannot be dragged.
Native reproduction / confirmation:
- Inspect the visible Codex pet HWND at a point over the pet.
- With WS_EX_LAYERED present (GWL_EXSTYLE 0x002800A8), WindowFromPoint resolves to the underlying window.
- Remove only WS_EX_LAYERED (0x00080000), refresh the frame, and retry: WindowFromPoint resolves to the pet HWND and clicking + dragging work immediately.
- Restore WS_EX_LAYERED: the pointer again resolves to the underlying window.
This was reproduced with both a custom V2 pet and an in-app built-in pet.
What is the expected behavior?
The visible floating pet should receive pointer input. A left-click should trigger the pet interaction, and click-and-drag should move the pet. Transparent areas outside the pet should continue to let clicks reach the underlying desktop or window.
Additional information
Environment:
- Windows 11
- Codex Desktop package: 26.901.6511.0
- App package version: 26.901.51231
- Electron dependency declared by the app: 42.3.0
Native A/B/A evidence from the same visible pet HWND:
- WS_EX_LAYERED removed: GWL_EXSTYLE 0x002000A8; Windows targeted the pet HWND; clicking and dragging worked.
- WS_EX_LAYERED restored: GWL_EXSTYLE 0x002800A8; Windows targeted the underlying HWND; the pet was click-through.
- WS_EX_LAYERED removed again: Windows targeted the pet HWND again.
Temporary workaround: remove only WS_EX_LAYERED (0x00080000) from the visible pet window and refresh its non-client frame. This restores interaction, but it is not a complete product fix because it may make the transparent rectangular bounds capture input more broadly than the visible pet pixels.
Likely area to investigate: the avatar overlay transitions between setIgnoreMouseEvents, input-shape updates, and presentation opacity/fade state. A layered state appears to persist after the overlay should be interactive.
Related issue: #42255
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Trace the avatar overlay transitions between setIgnoreMouseEvents, input-shape updates, and presentation opacity/fade state, using the Windows pet HWND behavior described in the report as the reproduction check. The issue is resolved when the visible pet receives clicks and drags while transparent areas still pass input to the underlying window.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- electron
- Domain
- desktop, operating-systems
- Issue type
- Bug
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Active
- Clarity
- Mostly clear
- Newbie friendliness
- 52/100