Windows: pet cannot stay visible over fullscreen apps — full diagnosis, partial fixes (#87/#89), and the hard OS limit
Maintainers usually reply within 1 day
Nobody has claimed this yet.
Assessment
- Difficulty
- 1/5
- Estimated time
- Under an hour
- Newbie friendliness
- 20/100
- Issue type
- Documentation
- Clarity
- Clearly specified
- Activity status
- Stale
- Tech stack
- electron, typescript
- Domain
- desktop, operating-systems
Research direction
Read this issue’s diagnosis and follow-ups #87 and #89 to understand the confirmed fixes and Windows fullscreen limitation. The issue describes the behavior as already diagnosed and says the available approaches were tried; there is no implementation task or named code file to start from. Done means preserving this explanation so future contributors do not repeat the investigation.
Written by the indexing model from the issue text.
Description
Summary
On Windows 11, the pet disappears whenever any app enters fullscreen (browser video, games) on its monitor. We chased this across several layers on a live machine; two real bugs were found and fixed (#87, and the follow-ups in #89), but the core ask — pet stays visible over fullscreen content — turns out to be impossible for an unsigned desktop app. This issue documents the full diagnosis so nobody has to re-derive it.
Repro
- Default pet visible anywhere on screen.
- Fullscreen a YouTube video in any Chromium browser (or launch a fullscreen game) for ~10s.
- Exit fullscreen.
Stock 3.3.0: pet never reappears above other windows until the user manually toggles tray → Hide/Show pet. App logs show zero hide events — the window is "visible" the whole time, just buried.
What we found, layer by layer
Layer 1 — Electron's cached always-on-top state (fixed in #87)
The shell strips WS_EX_TOPMOST from other windows when an app goes fullscreen, and never restores it. No Electron event fires. Worse: Electron's isAlwaysOnTop() still returns true (it reports its own cached flag, not the OS state), so every setAlwaysOnTop(true) — including the pre-existing show/restore re-assertions — short-circuits without reaching the OS. Verified live with a Win32 probe: the OS flag stayed off through minutes of re-asserts while the cache said on. Only a real hide()/show() cycle restored it, which is why the tray toggle "worked". Fix: drop the cached flag first (setAlwaysOnTop(false) → setAlwaysOnTop(true)) on a periodic win32 timer.
Layer 2 — Chromium occlusion tracker blanks the pet (fixed in #89)
Chromium's native window occlusion tracker marks every window on a display occluded while a fullscreen app is active there and stops painting it. A transparent pet window goes blank even when its z-order is intact. Fix: disable CalculateNativeWinOcclusion on win32.
Layer 3 — the shell's fullscreen band (NOT fixable)
With both fixes in place we measured the shell's actual behavior (500ms Win32 flag sampling, forced SetWindowPos(HWND_TOPMOST) at controlled times):
- Immediately after fullscreen starts there is a ~2–3s grace period where a forced topmost assert holds (flag verified True at t+2013ms, stripped by t+4012ms).
- Once the shell's demotion engages, every re-assertion is reverted instantly — with the app re-asserting every 1s, 40/40 samples over 20s of fullscreen showed the flag off.
- Fullscreen-optimization compat flags do not help.
DISABLEDXMAXIMIZEDWINDOWEDMODEon the browser exe, browser fully restarted: identical behavior. The demotion appears to be geometry-based (any foreground window covering the monitor), independent of FSO/DXGI mode.
Conclusion: while a fullscreen app is foreground, the topmost band is effectively reserved for signed UIAccess system overlays (Game Bar, Magnifier). The mainstream "game overlay" apps get around it by injecting into the target process's renderer — not an option for a desktop pet. Making OpenPets a UIAccess app would require Authenticode signing + uiAccess=true + Program Files install, with real security-review weight; almost certainly not worth it.
Where this lands
- #87 + #89: the pet now reappears within ~1 second of leaving fullscreen (previously: lost until manual toggle). During fullscreen it stays buried — by OS decree.
- If someone wants to revisit this, the only known avenues are UIAccess signing or per-target injection; both are documented above with their costs. Everything else (faster timers,
SetWindowPosvariants, FSO compat flags, occlusion switches) has been tried and measured on a live machine.
🤖 Generated with Claude Code
- Dominant language
- TypeScript
- Stars
- 1.3k
- Forks
- 125
- Avg merge
- 5h 8m
- Merged PRs (30d)
- 35
Getting set up
This project ships no dev container, Dockerfile or contributing guide, so setting up is up to you: start from its README, and see our first-contribution guide for the general steps.
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.
More from OpenPetsHQ/openpets
-
pet submission
Difficulty 2/5 1-3 hours Newbie friendliness 67/100
OpenPetsHQ/openpets#253 ·
Maintainers usually reply within 1 day
-
UsagiOpenpet submission
Difficulty 5/5 Over a week Newbie friendliness 20/100
OpenPetsHQ/openpets#254 ·
Maintainers usually reply within 1 day
-
Pet submission:Openpet submission
Difficulty 1/5 Under an hour Newbie friendliness 25/100
OpenPetsHQ/openpets#245 ·
Maintainers usually reply within 1 day
-
Feature: PluginsOpen
Difficulty 5/5 Over a week Newbie friendliness 24/100
OpenPetsHQ/openpets#240 ·
Maintainers usually reply within 1 day
-
Difficulty 3/5 1-2 days Newbie friendliness 55/100
OpenPetsHQ/openpets#238 · 1 comment ·
Maintainers usually reply within 1 day
All issues in OpenPetsHQ/openpets
Similar issues
-
bug
Difficulty 2/5 1-3 hours Newbie friendliness 78/100
Maintainers usually reply within 1 day
-
Difficulty 2/5 1-3 hours Newbie friendliness 67/100
mobile-next/mobile-mcp#526 ·
Maintainers usually reply within 1 day
-
e2e-failure ready-to-code
Difficulty 1/5 Under an hour Newbie friendliness 73/100
redhat-developer/rhdh-plugin-export-overlays#4470 · 1 comment ·
Maintainers usually reply within 1 day
-
Difficulty 2/5 1-3 hours Newbie friendliness 68/100
anthropics/anthropic-sdk-typescript#1273 ·
Maintainers usually reply within 10 days
-
Difficulty 2/5 1-3 hours Newbie friendliness 82/100
CopilotKit/OpenBot#815 ·
Maintainers usually reply within 1 day