Overview
XWayland is an X server that runs as a Wayland client, enabling X11 applications to run on Wayland compositors. Benefits of Mango’s XWayland Support:- Seamless Integration: X11 and Wayland apps work identically
- Full Feature Support: Tiling, floating, effects, and animations
- Stable Implementation: Based on proven wlroots XWayland support
- Window Management: Complete control over X11 windows
- No Flickering: Zero-flicker rendering for smooth visuals
Mango treats XWayland windows as first-class citizens. You won’t notice a difference between native Wayland and X11 applications in daily use.
Installation
Dependencies
XWayland support requires the XWayland server and related libraries:- Arch Linux
- Debian/Ubuntu
- Fedora
- Gentoo
Building Mango with XWayland
Mango includes XWayland support by default when built:Running X11 Applications
Automatic Detection
No configuration needed - just launch X11 applications normally:- Starts XWayland server when first X11 app launches
- Routes X11 applications through XWayland
- Manages X11 windows alongside Wayland windows
Verifying XWayland
Check if an application is using XWayland:Window Management
X11 Window Behavior
X11 windows in Mango behave identically to Wayland windows:Tiling
X11 windows tile in all layouts
Floating
X11 windows can float and be dragged
Fullscreen
X11 fullscreen properly supported
Focus
Focus management works seamlessly
Tags
X11 windows work with tag system
Animations
X11 windows animate like Wayland windows
Window States
All Mango window states work with X11 applications:X11-Specific Features
Window Properties
Access X11 window properties for rules:X11 Clipboard
X11 clipboard integration works automatically:- Copy in X11 app → Paste in Wayland app ✓
- Copy in Wayland app → Paste in X11 app ✓
- Selection clipboard (middle-click paste) supported ✓
Input Methods
X11 input methods work through XWayland:Application Compatibility
Fully Compatible
These X11 application types work perfectly:- Terminals: xterm, urxvt, terminator
- Browsers: Firefox (X11 build), Chromium (X11)
- Creative: GIMP, Inkscape, Blender (X11 mode)
- Gaming: Many X11 games via Steam/Wine
- Development: Many IDEs and editors
- Office: LibreOffice (X11 build)
Common X11 Applications
Firefox (X11)
Firefox (X11)
Full support including:
- Tiling and floating
- Fullscreen video
- Hardware acceleration
- Drag and drop
- Context menus
Electron Apps
Electron Apps
Many Electron apps use X11:
- VSCode (X11 fallback)
- Slack (X11 version)
- Discord (X11 version)
- Spotify
Games via Steam/Wine
Games via Steam/Wine
X11 games work through XWayland:
- Most native Linux games
- Wine/Proton games
- May need fullscreen workarounds
Legacy Applications
Legacy Applications
Older X11-only applications:
- Old GTK2 applications
- Legacy Qt applications
- Scientific software
- Specialized tools
Known Limitations
Performance
XWayland Performance
Mango’s XWayland implementation is highly optimized:- Zero Flickering: Perfect frame delivery for X11 apps
- Hardware Acceleration: Full GPU support for X11 rendering
- Minimal Overhead: Negligible performance impact vs native X11
- Efficient Rendering: Same scene graph as Wayland windows
Comparing Native vs XWayland
For most applications, you won’t notice performance differences:| Aspect | Wayland Native | XWayland |
|---|---|---|
| Rendering | Direct | Minimal overhead |
| Input Latency | Lowest | Near-identical |
| Tearing | None | None |
| GPU Usage | Optimal | Near-optimal |
| Memory | Lowest | Slightly higher |
Troubleshooting
XWayland not starting
XWayland not starting
Check if xorg-xwayland is installed:If missing, install xorg-xwayland package for your distribution.
X11 app not launching
X11 app not launching
Check Mango logs for XWayland errors:Ensure XWayland has permission to execute.
Clipboard not working between X11 and Wayland
Clipboard not working between X11 and Wayland
Install a clipboard manager that handles both:
Input method not working in X11 apps
Input method not working in X11 apps
Set environment variables in autostart or shell profile:
Fullscreen games not working properly
Fullscreen games not working properly
Try fake fullscreen instead:Some games work better with fake fullscreen on Wayland.
Blurry X11 applications on HiDPI
Blurry X11 applications on HiDPI
Set X11 DPI scaling:Add to autostart.sh for persistence.
Configuration
XWayland Environment Variables
Set in autostart.sh or shell profile:Window Rules for X11 Apps
xprop WM_CLASS to find class names for rules.
Migration from X11
Switching from X11 WM to Mango
If migrating from an X11 window manager:- Most X11 apps work unchanged - Launch them normally
- Wayland-native apps preferred - Use Wayland versions when available
- Check for Wayland alternatives - Many apps have Wayland builds
- Update config - Some X11-specific configs may need adjustment
Finding Wayland Alternatives
| X11 App | Wayland Alternative |
|---|---|
| xterm | foot, alacritty |
| dmenu | bemenu, wofi, rofi (Wayland) |
| dunst (X11) | mako, swaync |
| feh | imv, swayimg |
| scrot | grim + slurp |
Best Practices
Prefer Wayland Native
Use Wayland versions of apps when available for best performance and security
XWayland as Fallback
Keep XWayland for legacy apps that don’t have Wayland support
Test Compatibility
Test critical X11 apps before full migration to ensure they work properly
Monitor Performance
Check if X11 apps impact performance; consider Wayland alternatives if needed
Related Documentation
- Installation - Installing XWayland dependencies
- Configuration Rules - Configuring rules for applications
- Recommended Tools - Wayland-native alternatives
- Input Devices - Configuring input devices
