Skip to content

[Radar] Don't save the culling window's collapsed rect - #8

Open
yokkenUA wants to merge 1 commit into
Gordin:mainfrom
yokkenUA:fix/radar-cull-window-collapse
Open

yokkenUA wants to merge 1 commit into
Gordin:mainfrom
yokkenUA:fix/radar-cull-window-collapse

Conversation

@yokkenUA

@yokkenUA yokkenUA commented Sep 5, 2026

Copy link
Copy Markdown

Everything Radar draws with DrawMapInCull / DrawPOIInCull goes into the culling window, so its rect clips the walkable map and every POI. That rect is captured from the live ImGui window every frame while ModifyCullWindow is on -- including when the window is COLLAPSED, where ImGui reports just the title bar.

Found in a live session as CullWindowPos {0,0}, CullWindowSize {400,28}: 400 is the initial size this code sets via SetNextWindowSize, and 28 is a collapsed window's title bar. With that saved, the overlay is clipped to a sliver in the corner while every read behind it is healthy, so the plugin looks broken for no visible reason.

It is reachable through normal use rather than by accident: the gesture that confirms the window is a double click, and a double click on the title bar is also ImGui's own collapse gesture. Confirming can therefore store {W, 28} and set ModifyCullWindow = false in the same frame, and from then on the only control that could restore it is the culling window itself, which is no longer drawn.

Two changes: skip the capture while the window is collapsed, and repair a degenerate rect saved by an earlier build -- without the repair, anyone already in this state stays stuck after updating. The 64px threshold is well below any usable culling window, and MakeCullWindowFullScreen writes the full window size anyway.

Everything Radar draws with DrawMapInCull / DrawPOIInCull goes into the
culling window, so its rect clips the walkable map and every POI. That
rect is captured from the live ImGui window every frame while
ModifyCullWindow is on -- including when the window is COLLAPSED, where
ImGui reports just the title bar.

Found in a live session as CullWindowPos {0,0}, CullWindowSize {400,28}:
400 is the initial size this code sets via SetNextWindowSize, and 28 is
a collapsed window's title bar. With that saved, the overlay is clipped
to a sliver in the corner while every read behind it is healthy, so the
plugin looks broken for no visible reason.

It is reachable through normal use rather than by accident: the gesture
that confirms the window is a double click, and a double click on the
title bar is also ImGui's own collapse gesture. Confirming can therefore
store {W, 28} and set ModifyCullWindow = false in the same frame, and
from then on the only control that could restore it is the culling
window itself, which is no longer drawn.

Two changes: skip the capture while the window is collapsed, and repair
a degenerate rect saved by an earlier build -- without the repair,
anyone already in this state stays stuck after updating. The 64px
threshold is well below any usable culling window, and
MakeCullWindowFullScreen writes the full window size anyway.
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.

1 participant