A raise asked in the pass a floating window first shows is asked again
in the next pass (Persist::raise_again). When another window was raised
in that next pass, both went to the top of egui's area order together,
and egui keeps the old order among the layers it raises in one pass. The
window raised first had already gone above the second one, so it stayed
in front: activating one document window and then another one frame
later left the first in front.
end_pass now compares egui's area order of the lifted layers with the
raise order. When a carried raise stands above a raise asked in this
pass, only this pass's raises go up, and every raise is asked again in
the next pass, where the newer ones already stand above the carried
ones. A root asked more than once in a pass is carried once, in its last
place.
Test: a_window_raised_after_a_carried_raise_comes_in_front_of_it.
The fallback overlay was not movable, so its title row had no move band, and DocumentWindow dropped the layer's placement changes while first_placed held the window at the host's rect. DocumentWindowOutput::placed gives the rect a move or resize reached in the pass.
DocumentWindow::level stands the window at a WindowLevel; with Palette a
floating document stays above the app's main window while the app is
active, drops below a blocking dialog and hides with the minimized main
window. first_placed's doc says what it does: the window is kept at the
rect while shown, so a caller whose user moves the window follows it.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>