-
-
Notifications
You must be signed in to change notification settings - Fork 3.3k
feat(linux): migrate to GTK4 and WebKitGTK 6.0 #14684
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: dev
Are you sure you want to change the base?
Conversation
- Update tauri-runtime-wry to use gtk4 0.10 and webkit6 0.5 - Update tauri-runtime to use gtk4 0.10 and webkit6 0.5 - Update tauri crate to use gtk4 0.10 and webkit6 0.5 - Replace webkit2gtk with webkit6 across all crates - Fix IsA trait path: gtk::glib::IsA → gtk::prelude::IsA - Update undecorated_resizing to use GTK4 GestureClick API - Replace WindowEdge with SurfaceEdge for resize operations - Replace workarea() with geometry() for monitor info - Add workspace patches for wry-gtk4 and tao-gtk4 Note: muda and tray-icon still need GTK4 patches to compile 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude Opus 4.5 <[email protected]>
- Add linux-ksni feature to tray-icon dependency in crates/tauri - Add workspace patches for wry, tao, muda, and tray-icon forks - Use correct wry-gtk4/wry-upstream path for GTK4 wry fork 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude Opus 4.5 <[email protected]>
- Use #[cfg(not(target_os = "linux"))] on set_temp_dir_path methods - Use cfg-gated imports for Path/PathBuf (maintainer pattern) - temp_dir_path is not applicable on Linux with KSNI Part of GTK4 migration for Tauri Linux support. 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude Opus 4.5 <[email protected]>
🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude Opus 4.5 <[email protected]>
Point to public forks instead of local paths so the PR can be tested by maintainers. These forks track the upstream GTK4 PRs: - tao: tracks tauri-apps/tao#1104 - wry: tracks tauri-apps/wry#1530 - muda: tracks tauri-apps/muda#272 - tray-icon: tracks tauri-apps/tray-icon#201 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude Opus 4.5 <[email protected]>
Package Changes Through 296a2f3There are 7 changes which include tauri-utils with patch, tauri-build with patch, tauri-cli with patch, @tauri-apps/cli with patch, tauri with minor, tauri-runtime-wry with minor, tauri-runtime with minor Planned Package VersionsThe following package releases are the planned based on the context of changes in this pull request.
Add another change file through the GitHub UI by following this link. Read about change files or the docs at github.com/jbolda/covector |
Forward tao/libadwaita feature through tauri-runtime-wry to tauri. When enabled, uses libadwaita for proper GNOME styling (rounded corners, themed menus, etc.) on Linux GTK4 builds. 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude Opus 4.5 <[email protected]>
🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude Opus 4.5 <[email protected]>
* Adds `iproute2` to the wrapped `defguard-service` * Adds `update-desktop-database` to the wrapped `defguard-client` * Tauri Builds on the GTK3/WebKitGTK4.1, there was a mismatch with GTK4/WebKitGTK4.1, (GTK4 should use WebKitGTK6.0, but that isn't supported [yet](tauri-apps/tauri#14684) for tauri. * No `Makefile` so we can overwrite/rename `postInstall` with `installPhase`. * Formatting With these changes in place, it fixes issue [DefGuard#728](DefGuard#728).
* Adds `iproute2` to the wrapped `defguard-service` * Adds `update-desktop-database` to the wrapped `defguard-client` * Tauri Builds on the GTK3/WebKitGTK4.1, there was a mismatch with GTK4/WebKitGTK4.1, (GTK4 should use WebKitGTK6.0, but that isn't supported [yet](tauri-apps/tauri#14684) for tauri. * No `Makefile` so we can overwrite/rename `postInstall` with `installPhase`. * Formatting With these changes in place, it fixes issue [DefGuard#728](DefGuard#728).
|
I tested this Gtk4 port (with your branches of tao/wry/...) and it is working fine with my project. The only issue I found is in tao when disabling the x11 feature, and I sent a fix here : rmakestrash-jpg/tao#1 Thanks @rmakestrash-jpg for your work on this. |
Summary
This PR migrates Tauri's Linux backend from GTK3/WebKitGTK 4.x to GTK4/WebKitGTK 6.0, modernizing the Linux platform support and enabling access to GTK4's improved APIs.
Motivation
GTK4 brings significant improvements including better rendering performance, modernized input handling, and continued upstream support. WebKitGTK 6.0 provides the latest web engine features and security updates. This migration ensures Tauri remains on actively maintained dependencies for the Linux platform.
Closes #12561
Closes #12562
Closes #12563
Related to #7335
Changes
tauri-runtime-wry
gtk 0.18togtk4webkit2gtktowebkit6GestureClickAPI (replaces the GTK3 event-based approach)geometry()instead of the removedworkarea()methodtauri-runtime
webkit2gtk::WebViewtowebkit6::WebViewtauri
temp_dir_pathmethods on Linux (no longer needed since ksni uses DBus directly rather than temp files)Dependencies
This PR depends on upstream work in related crates. The patch entries point to personal forks that track the following upstream PRs:
I've commented on each upstream PR offering to help with integration testing:
tao#1104, wry#1530, muda#272, tray-icon#201
Note: All upstream PRs are currently in Draft status. This PR is submitted to facilitate integration testing and gather feedback while the dependency PRs are finalized.
Relationship to #12319
PR #12319 by @dfaust introduces ksni as an optional feature for tray icon support. This GTK4 PR makes ksni mandatory on GTK4 because libappindicator is incompatible with GTK4. The two approaches are:
Breaking Changes (Linux only)
TrayIconBuilder::temp_dir_path()- removed (ksni uses DBus, no temp files needed)TrayIcon::set_temp_dir_path()- removed (ksni uses DBus, no temp files needed)System Requirements
Follow-up Work
A companion PR for
plugins-workspacewill be submitted separately to set xdg-portal as the default file picker on GTK4 (the GTK3 file chooser dialog is not available).Test Plan
🤖 Generated with Claude Code