Note
Status: Merged into v3-alpha
PR #4958 has been merged. Clone from v3-alpha to test this feature.
Wails v3 now includes experimental support for GTK4 and WebKitGTK 6.0 on Linux via the -tags gtk4 build flag.
Why GTK4?
Better Wayland support - Native Wayland rendering without X11 compatibility layer
Improved performance - GPU-accelerated rendering pipeline
Modern features - Fractional scaling, HDR support, better HiDPI handling
Future-proof - GTK3 is in maintenance mode, GTK4 is the future of Linux desktop
Getting Started
Step 1: Install System Dependencies
Install GTK4 and WebKitGTK 6.0 development packages:
Distro
Command
Ubuntu/Debian
sudo apt install libgtk-4-dev libwebkitgtk-6.0-dev
Fedora
sudo dnf install gtk4-devel webkitgtk6.0-devel
Arch Linux
sudo pacman -S gtk4 webkitgtk-6.0
openSUSE
sudo zypper install gtk4-devel webkitgtk-6_0-devel
Gentoo
sudo emerge gui-libs/gtk net-libs/webkit-gtk:6
Solus
sudo eopkg install libgtk-4-devel libwebkit-gtk6-devel
NixOS
Add gtk4 and webkitgtk_6_0 to your environment
Step 2: Clone the Repository
git clone -b v3-alpha https://github.com/wailsapp/wails.git
cd wails/v3
Step 3: Verify Installation
go install ./cmd/wails3
wails3 doctor
You should see both GTK3 (required) and GTK4 (experimental/optional) listed.
Step 4: Run the Examples with GTK4
Browse the examples in v3/examples/ and run them with the GTK4 tag:
# List available examples
ls examples/
# Run an example with GTK4
cd examples/menu
go run -tags gtk4 .
# Or build it
go build -tags gtk4 .
./menu
Recommended examples to test:
examples/menu - Tests menu functionality
examples/dialogs - Tests file/message dialogs
examples/drag-n-drop - Tests drag and drop
examples/window - Tests window management
examples/events - Tests event handling
examples/clipboard - Tests clipboard operations
What We Need You To Test
π Test 1: Wails Doctor Output
Run wails3 doctor and report:
If doctor shows wrong package names, please tell us:
Your distribution and version
Your package manager (apt, dnf, pacman, etc.)
The correct package names for your system
πͺ Test 2: Window Management
π Test 3: Menus
π Test 4: Dialogs
π±οΈ Test 5: Drag and Drop
π Test 6: Performance
Compare GTK3 vs GTK4 builds:
π₯οΈ Test 7: Display
How to Report Your Results
Please include this info:
## System Info
- **Distro**: (e.g., Ubuntu 24.04, Fedora 40, Arch)
- **Package Manager**: (apt, dnf, pacman, zypper, emerge, eopkg, nix)
- **Desktop Environment**: (GNOME, KDE, XFCE, Sway, etc.)
- **Window Manager**: (Mutter, KWin, Sway, i3, etc.)
- **Display Server**: Wayland / X11
- **GTK4 Version**: `pkg-config --modversion gtk4`
- **WebKitGTK Version**: `pkg-config --modversion webkitgtk-6.0`
## Test Results
- Doctor output: β
/ β / β οΈ
- Window management: β
/ β / β οΈ
- Menus: β
/ β / β οΈ
- Dialogs: β
/ β / β οΈ
- Drag and drop: β
/ β / β οΈ
- Performance: Better / Same / Worse than GTK3
- Display/scaling: β
/ β / β οΈ
## Details
[Any specific issues, error messages, or observations]
Reporting Bugs
Please use sub-issues to report specific bugs. This keeps everything organized under this parent issue.
To create a sub-issue:
Click "Create sub-issue" below
Use [GTK4] prefix in the title (e.g., [GTK4] Menu accelerators not working on KDE Wayland)
Include your system info and steps to reproduce
Contributing Fixes
PRs welcome! Please:
Target the v3-alpha branch
Test with both default (GTK3) and -tags gtk4 builds
Reference this issue in your PR
Known Limitations
Limitation
Reason
Window positioning on Wayland
Wayland protocol doesn't allow arbitrary positioning
ShowHiddenFiles() in file dialogs
GTK4 uses portal-based dialogs controlled by DE
CanCreateDirectories()
Same as above - portal controls this
X11 performance may vary
GTK4 is optimized primarily for Wayland
Related
Thank you for helping test GTK4 support! Your feedback directly shapes whether this becomes the default in a future release.
Note
Status: Merged into
v3-alphaPR #4958 has been merged. Clone from
v3-alphato test this feature.Wails v3 now includes experimental support for GTK4 and WebKitGTK 6.0 on Linux via the
-tags gtk4build flag.Why GTK4?
Getting Started
Step 1: Install System Dependencies
Install GTK4 and WebKitGTK 6.0 development packages:
sudo apt install libgtk-4-dev libwebkitgtk-6.0-devsudo dnf install gtk4-devel webkitgtk6.0-develsudo pacman -S gtk4 webkitgtk-6.0sudo zypper install gtk4-devel webkitgtk-6_0-develsudo emerge gui-libs/gtk net-libs/webkit-gtk:6sudo eopkg install libgtk-4-devel libwebkit-gtk6-develgtk4andwebkitgtk_6_0to your environmentStep 2: Clone the Repository
git clone -b v3-alpha https://github.com/wailsapp/wails.git cd wails/v3Step 3: Verify Installation
You should see both GTK3 (required) and GTK4 (experimental/optional) listed.
Step 4: Run the Examples with GTK4
Browse the examples in
v3/examples/and run them with the GTK4 tag:Recommended examples to test:
examples/menu- Tests menu functionalityexamples/dialogs- Tests file/message dialogsexamples/drag-n-drop- Tests drag and dropexamples/window- Tests window managementexamples/events- Tests event handlingexamples/clipboard- Tests clipboard operationsWhat We Need You To Test
π Test 1: Wails Doctor Output
Run
wails3 doctorand report:If doctor shows wrong package names, please tell us:
πͺ Test 2: Window Management
π Test 3: Menus
π Test 4: Dialogs
π±οΈ Test 5: Drag and Drop
π Test 6: Performance
Compare GTK3 vs GTK4 builds:
π₯οΈ Test 7: Display
How to Report Your Results
Please include this info:
Reporting Bugs
Please use sub-issues to report specific bugs. This keeps everything organized under this parent issue.
To create a sub-issue:
[GTK4]prefix in the title (e.g.,[GTK4] Menu accelerators not working on KDE Wayland)Contributing Fixes
PRs welcome! Please:
v3-alphabranch-tags gtk4buildsKnown Limitations
ShowHiddenFiles()in file dialogsCanCreateDirectories()Related
IMPLEMENTATION.mdin repoThank you for helping test GTK4 support! Your feedback directly shapes whether this becomes the default in a future release.