map: the windowed map dragged WorldMapTooltip out of the TOOLTIP stratum

grom, twice: *"I can't see the pfquest tooltips under the map"*, and then *"still can't
read the pfquest tooltips when on the map, and you can see where it pops out on the left
side where the map ends."* That second sentence is the whole diagnosis: the part of the
tooltip hanging off the map is readable, the part over it is not.

`WorldMapTooltip` is a child of `WorldMapFrame` that declares `frameStrata="TOOLTIP"`
(`WorldMapFrame.xml:748`), and `SetFrameStrata` forces the whole subtree (`0x76a470`).
The realm knows: `WorldMapFrame_Minimize` (`WorldMapFrame.lua:210`) and `_Maximize`
(`:284`) each re-assert that TOOLTIP on the line after their reparent. `SeatLevels`, which
exists to put the window's own FULLSCREEN back after `_Minimize`'s
`WorldMapFrame:SetParent(UIParent)` drops it, runs after them on the same call and took
the tooltip down with it -- to FULLSCREEN level 1, under `WorldMapDetailFrame` at level 3.

So the tooltip's text and its pfUI backdrop fill draw under the map art while pfUI's
`backdrop_border` child, at level 3, draws across it: a tooltip-shaped outline over the
map with nothing inside it. Windowed only, because `_Maximize` reparents to `nil`, leaves
the stratum alone, and the guard in `SeatLevels` never fires -- which is why a capture
driven straight from `ToggleWorldMap` never showed it.

Put back what the re-assert takes, exactly as the realm's own two callers do. Reproduced
and verified in a capture with his addons and saved variables at his resolution.

Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01SgstFWtn1RxEJ5kVrpgYwn
This commit is contained in:
grom
2026-11-08 16:47:49 -07:00
co-authored by Claude Opus 5
parent b49dd872fa
commit d1d44a7801
2 changed files with 42 additions and 0 deletions
@@ -2123,9 +2123,26 @@ local function BuildCanvas()
-- read off the binary, and the realm's minimize is the thing that spends it. Here it is one
-- window's own declared stratum restored after the code that drops it, on the same hook that
-- already re-seats the levels for the same reason.
--
-- Restoring the window's stratum is not free: `SetFrameStrata` forces the whole subtree
-- (`0x76a470`), and `WorldMapTooltip` is **a child of this window with a stratum of its own**
-- -- `WorldMapFrame.xml:748` declares `frameStrata="TOOLTIP"`. The realm knows it: both
-- `WorldMapFrame_Minimize` (`WorldMapFrame.lua:210`) and `_Maximize` (`:284`) re-assert that
-- TOOLTIP on the line after their reparent. This hook runs after them, so the re-assert above
-- took the tooltip back down with it -- to FULLSCREEN, level 1, under `WorldMapDetailFrame`
-- at level 3.
--
-- What that looks like is grom's report: a pfQuest node tooltip whose text and dark fill stop
-- dead at the map art's edge while its border, on pfUI's `backdrop_border` child at level 3,
-- carries on across it. Only in the windowed map, because `_Maximize` reparents to `nil` and
-- leaves the stratum alone, so the guard below never fires there.
local function SeatLevels()
if map:GetFrameStrata() ~= MAP_STRATA then
map:SetFrameStrata(MAP_STRATA)
-- Put back what that just took, exactly as the realm's own two callers do.
if WorldMapTooltip then
WorldMapTooltip:SetFrameStrata("TOOLTIP")
end
end
local base = map:GetFrameLevel() or 0
sc:SetFrameLevel(base + 1)
@@ -434,6 +434,31 @@ fn the_windowed_scale_does_not_reach_the_detail_frames_own_units() {
);
}
/// `WorldMapTooltip` is a child of `WorldMapFrame` that declares a stratum of its own
/// (`WorldMapFrame.xml:748`, `frameStrata="TOOLTIP"`), and `SetFrameStrata` forces the whole
/// subtree. So the canvas's own `SeatLevels`, which exists to put the window's FULLSCREEN back
/// after the realm's `WorldMapFrame:SetParent(UIParent)` drops it, used to take the tooltip down
/// with it — to FULLSCREEN level 1, under `WorldMapDetailFrame` at level 3.
///
/// grom saw that as a pfQuest node tooltip whose text and dark fill stop at the map art's edge
/// while pfUI's `backdrop_border` child, at level 3, draws across it. Windowed only: `_Maximize`
/// reparents to `nil` and leaves the stratum alone, so the re-assert never runs there.
#[test]
fn the_map_tooltip_keeps_its_own_stratum_through_both_window_modes() {
let Some(mut s) = harness() else { return };
for call in ["WorldMapFrame_Minimize()", "WorldMapFrame_Maximize()"] {
s.run(call).expect("the stock mode switch runs");
s.resolve();
let strata: String = s
.eval("return WorldMapTooltip:GetFrameStrata()")
.expect("the tooltip answers a stratum");
assert_eq!(
strata, "TOOLTIP",
"{call} left the map tooltip in {strata}, so the map art draws over it"
);
}
}
/// 1.12 lays its map art out twice, once per window mode, and the canvas container has to be
/// where that art would have been — `WorldMapFrame_Minimize` insets the detail frame 15,-33
/// inside a 720x521 window at scale 0.7 (701x468 of art: 15 left, 4 right, 33 top, 20 bottom),