fix(linux): position multi-webview children via gtk::Fixed (#10420)#15463
Draft
ds1 wants to merge 1 commit into
Draft
fix(linux): position multi-webview children via gtk::Fixed (#10420)#15463ds1 wants to merge 1 commit into
ds1 wants to merge 1 commit into
Conversation
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]>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
What
On Linux, build child webviews (
WebviewKind::WindowChild) into the window'sgtk::Fixedoverlay layer (WindowExtUnix::content_fixed) instead of the default verticalgtk::Box. This makesset_bounds/set_position/set_sizeposition child webviews over the window instead of GTK stacking them — fixing multi-webview positioning on Linux (#10420).Depends on
WindowExtUnix::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-wrycompiles clean.)set_bounds→gtk::Fixed::move_(tauri-apps/wry#1745), so the position persists across relayouts.Changes
create_webviewLinuxWindowChildarm:build_gtk(window.content_fixed())instead ofdefault_vbox()..changesentry (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.