host: tab placements skip unchanged bounds, one SetBounds per move, and follow window resizes natively
layout.rs (headless, tested): Placements remembers each tab webview's last rectangle and visibility, so a tabs_sync that changes nothing makes no native call and one that moves one pane touches one webview; Frame/follow_rect estimate where panes go when the window size changes (outer margins fixed, proportional in between, shared borders stay shared). host.rs: place_tab/forget_tab use it; place_child is a single set_bounds (one WebView2 SetBounds instead of a move then a resize, each a page re-layout); follow_window_resizes re-places visible tabs from the window's own Resized events on the main thread, before the shell lays out again, and keeps WindowMetrics current so a sync needs no blocking round trips for the window size; layout_window says when a layout was made for a stale size. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
parent
0ad52a4ce7
commit
9313f249af
3 changed files with 327 additions and 6 deletions
|
|
@ -13,10 +13,12 @@
|
|||
//! - [`hotfix`]: the signed, data-only hotfix channel.
|
||||
//! - [`update`]: silent-update scheduling and the crash handshake.
|
||||
//! - [`tabs`]: tab layout/state payloads, link routing and tab-chrome validation.
|
||||
//! - [`layout`]: native placement bookkeeping (unchanged bounds skipped, window-resize follow).
|
||||
//!
|
||||
//! With the `tauri` feature, [`host`] adds the Tauri glue that does not depend on app state.
|
||||
|
||||
pub mod hotfix;
|
||||
pub mod layout;
|
||||
pub mod plugins;
|
||||
pub mod policy;
|
||||
pub mod profiles;
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue