Skip to content

fix(linux): position multi-webview children via gtk::Fixed (#10420)#15463

Draft
ds1 wants to merge 1 commit into
tauri-apps:devfrom
ds1:fix/linux-multiwebview-fixed-positioning
Draft

fix(linux): position multi-webview children via gtk::Fixed (#10420)#15463
ds1 wants to merge 1 commit into
tauri-apps:devfrom
ds1:fix/linux-multiwebview-fixed-positioning

Conversation

@ds1

@ds1 ds1 commented Jun 3, 2026

Copy link
Copy Markdown

What

On Linux, build child webviews (WebviewKind::WindowChild) into the window's gtk::Fixed overlay layer (WindowExtUnix::content_fixed) instead of the default vertical gtk::Box. This makes set_bounds / set_position / set_size position child webviews over the window instead of GTK stacking them — fixing multi-webview positioning on Linux (#10420).

Depends on

  • taoWindowExtUnix::content_fixed (tauri-apps/tao#1232). This won't compile until that lands and releases, so this PR is a draft until then. (Validated locally against the patched tao: tauri-runtime-wry compiles clean.)
  • wryset_boundsgtk::Fixed::move_ (tauri-apps/wry#1745), so the position persists across relayouts.

Changes

  • create_webview Linux WindowChild arm: build_gtk(window.content_fixed()) instead of default_vbox().
  • .changes entry (tauri-runtime-wry: patch).

Testing

Validated (with the tao + wry changes applied) in a Tauri v2 app on WSLg (Ubuntu 22.04, WebKitGTK 2.50.4): content webviews render full-window and hold their bounds across tab-switch, multi-tab, drawer-resize, and window-resize. Single-webview windows are unchanged.

Full root cause + the three-part fix: #10420.

On Linux, build WindowChild webviews into the window's gtk::Fixed overlay (WindowExtUnix::content_fixed) instead of the default vertical gtk::Box, so set_bounds positions them instead of GTK stacking. Fixes tauri-apps#10420. Requires the corresponding tao content_fixed change.

Signed-off-by: ds1 <[email protected]>
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.

[bug] Broken positioning with multiwebview (unstable feature) example

1 participant