Repository navigation
Description
Current behavior 🐛
On an Uno Platform Desktop (Skia) app running on the X11 target under WSLg (Windows Subsystem for Linux GUI, which uses Weston/XWayland), a WebView2 control is never displayed: the app window renders normally, but the area where the WebView should appear stays empty/transparent.
xwininfo -root -tree shows the WebKitGTK window is not embedded in the app's window — it is held under the Weston window manager's own frame window (a 10x10 window at the origin), so it is clipped away entirely. Depending on timing it can also be observed as a 1x1 window at -1,-1.
The same app works correctly on Windows and on typical Linux desktop window managers (mutter/KWin).
Root cause (two layered problems):
X11XamlRootHost.AttachSubWindowpasses anXWindowAttributesbuffer toXChangeWindowAttributes, which expects the differently-laid-outXSetWindowAttributes. Due to a struct-layout coincidence, theoverride_redirectvalue actually applied comes frommap_installed(offset 88) — usually1for plain default-colormap windows, but0for GTK windows (which use their own colormap). So the override-redirect flag the code intends to set is never reliably applied.- Without override-redirect, Weston's XWM starts managing the WebKitGTK toplevel when GTK maps it and reparents it into its own frame window. Once Weston's XWM manages a window, reparenting it away is not reliably possible (it re-reparents the window under its own even after
XWithdrawWindow). Mainstream desktop WMs release the window when it is reparented away, which is why this only breaks under Weston/WSLg.
Expected behavior 🎯
The WebView2 control displays and works normally when the app runs on the X11 target under WSLg (and Weston/XWayland environments in general).
How to reproduce it (as minimally and precisely as possible) 🔬
- Create a Desktop (Skia) app with a
WebView2control navigating to any page (e.g.dotnet new unoapp, add<WebView2 Source="https://platform.uno" />). - Install the WebView2 Linux prerequisites (WebKitGTK 4.1 / GTK 3) per https://aka.platform.uno/webview2.
- Run the app inside WSL (WSLg) on Windows 11.
- The app window shows, the WebView area stays empty.
xwininfo -root -treeshows theUno WebView <random>window parented under the "Weston WM" window instead of the app window.
Workaround 🛠️
None found.
Renderer 🎨
- Skia
- Native
Affected platforms 📱💻🖥️
Desktop (X11)
Uno.Sdk version (and other relevant versions) 📦
Reproduced with Uno.Sdk 6.4.58 and with current master.
IDE version 🧑💻
No response
Anything else we need to know? 💬
Also affects any Weston/XWayland-based environment (e.g. kiosk-style Weston sessions), not just WSLg — the failing behavior is in Weston's XWM, which WSLg embeds.
Activity
khaskoul commentedon Aug 16, 2026
Fix verified with:
Templates/SDK: 6.7.10
Platform(s): Desktop
VS VSIX: 6.7.5
IDE: VS 18.4.6
OS: Windows WSL2