Repository navigation
Overlay: fixed-size, non-activating, shown only while Elite is in front (#204) - #209
Merged
Merged
Conversation
…nt (#204) The overlay was a topmost, self-resizing window over every app: each jump resized it, it was never marked non-activating, and it sat over EDCopilot permanently. It now has a fixed window size, updates only when the snapshot changed, is WS_EX_NOACTIVATE, and by default is visible only while Elite Dangerous (or EDNexus) is the foreground app (setting Overlay.OnlyWhenGameFocused, on by default). Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
Contributor
|
Warning Review limit reachedYou've used all free OSS reviews for now. Wait for the free limit to reset to keep reviewing this public repository. Next included review available in 36 minutes. View limit detailsLimit details: You’ve used the included review currently available. Review configuration: ⚙️ Run configuration
📒 Files selected for processing (11)
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. Comment |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Fixes #204 (the overlay minimising/unfocusing the game and interfering with EDCopilot on a system jump).
What changed
The overlay was a topmost, self-resizing, always-on-top window over every app. On a jump its content changed shape, which was a native resize of a topmost window; it was never marked non-activating; and it sat over EDCopilot all the time. Now:
OverlayWindowhas a fixed size (360x330); the visible panel is the innerBorder, which grows and shrinks inside the transparent, click-through window. A jump no longer changes the native window.OverlayContent.SameAscompares snapshots by value (the shortfall list was compared by reference, so every tick looked "changed");WindowsOverlay.Updateskips identical snapshots, so an idle overlay touches nothing, and the shortfall list is no longer rebuilt every 250 ms.WS_EX_NOACTIVATEadded to the window styles (alongside layered/transparent/toolwindow), so it can never become the active window. If it is ever activated anyway, a trace line says so.OverlayVisibilityPolicy): visible when the foreground process isEliteDangerous64(or EDNexus itself, so the Settings preview works), hidden otherwise, so it no longer sits over EDCopilot or any other app. Unknown foreground fails open. Foreground is polled every 750 ms and the window is shown/hidden only on a change.Overlay.OnlyWhenGameFocused(default on) with a checkbox in Settings -> Overlay & Voice to keep the old always-on-top behaviour. Show/hide transitions are traced for diagnostics.Behaviour change to know about
By default the overlay now disappears when another app is in front (e.g. a browser, EDCopilot) and returns when Elite is. Anyone who wants it on a second monitor while Elite is not focused should untick "Only show while Elite Dangerous is in front".
Verified
dotnet build0 warnings; fulldotnet testgreen, with new tests for the visibility rule (game/own process/other apps/unknown/off, case and.exehandling) and for snapshot equality (separately built identical snapshots are the same; any visible change is not).Not verified (needs a person)
I cannot run the overlay or the game here (and a locally built app auto-installs the latest release). Manual test needed with EDCopilot and Elite running: overlay on, several jumps with a plotted route and a colonisation shortfall: confirm nothing minimises, no window loses focus, and the overlay appears only with Elite in front. Also try Elite in exclusive fullscreen vs borderless. If problems persist, the new trace lines (
Overlay: shown/hidden,Overlay: the overlay window was activated) in the app log will show what happened.The fixed window size (360x330) is a first estimate large enough for five shortfall lines and two bio lines; if text is ever clipped on a long system name it can be raised.
🤖 Generated with Claude Code