App: fix the on_main_frame_committed doc, the hook orders a swap, it does not make it atomic
CI / build + test (push) Has been cancelled
CI / cargo audit (push) Has been cancelled

The comment promised that a subsurface mounted or retired from the hook lands in the same flush as the main frame. It does not: the main buffer goes out with its swap, which flushes the connection at once, and the subsurfaces are reconciled afterwards. What the hook guarantees is ordering, the main frame is already sent when it fires, which is enough to retire a subsurface safely but not to mount one without a gap.
This commit is contained in:
2026-09-10 22:57:30 +02:00
parent 87f52565c3
commit 92b090a441
+3 -2
View File
@@ -563,8 +563,9 @@ pub trait App: 'static
/// Called every time a buffer for the main surface has been rendered and
/// committed, before the subsurfaces are reconciled for the same
/// iteration. Lets a host retire or mount a subsurface in the same flush
/// as the main frame it replaces, so the swap lands in one frame.
/// iteration. Lets a host sequence a subsurface change after the main
/// frame it depends on: a subsurface retired here goes away only once
/// the main frame that replaces it has been sent.
fn on_main_frame_committed( &mut self ) {}
/// Called when the surface is asked to close (compositor request, titlebar button,