Skip to content

Commit 7c33765

Browse files
committed
docs: add docs for GDK_BACKEND
1 parent 821b8d9 commit 7c33765

File tree

1 file changed

+10
-1
lines changed

1 file changed

+10
-1
lines changed

doc/articles/controls/WebView.md

Lines changed: 10 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -168,7 +168,7 @@ public App()
168168
>
169169
> This feature will only work for security reasons when the application runs in Debug mode.
170170
171-
## X11 specifics
171+
## Linux specifics
172172

173173
In order to use WebView2 on Linux, you'll need to install `libwebkit2gtk` and `libgtk3-0`:
174174

@@ -186,6 +186,15 @@ In order to use WebView2 on Linux, you'll need to install `libwebkit2gtk` and `l
186186

187187
It's overall preferable to use libwebkit2gtk 4.1 whenever possible in order to get http headers support, if your environment allows for it.
188188

189+
### Wayland support
190+
191+
When running on a Wayland environment, the `WebView` control requires the environment variable `GDK_BACKEND` to be set to `x11` to function correctly.
192+
193+
```bash
194+
export GDK_BACKEND=x11
195+
dotnet run
196+
```
197+
189198
## WebResourceRequested
190199

191200
The `WebResourceRequested` event allows you to intercept and modify HTTP requests made by the WebView. This is useful for scenarios like injecting custom headers, implementing authentication, or modifying request/response content.

0 commit comments

Comments
 (0)