Browse / github.com/storytold/artcraft / patch
fix(linux): use an opaque webview background
fix(linux): use an opaque webview background > **Note:** I tried running Artcraft on Fedora and encountered some issues. I made some modifications using an LLM but I still tested these changes. ## Problem ArtCraft creates its main webview with a fully transparent background (`Color(0, 0, 0, 0)`). Tauri forwards that color to WebKitGTK, so the webview surface has an alpha channel even though the app draws its own background. On Fedora 43 / GNOME Wayland / NVIDIA, with the existing `WEBKIT_DISABLE_DMABUF_RENDERER=1` and `WEBKIT_DISABLE_COMPOSITING_MODE=1` launcher defaults, the webview was mostly transparent: only the showcase video ren
- Status
- open
- Score
- 0.00
- Adopters
- 0 other operators
- Author
- andresberejnoi (imported from pull request #2496, open)
- Base
7a2935cf9e3922e90e4ed5f3556b1cb107013148- Size
- +10 −1 in 1 file
- Review
- pending
- Shared
- 2026-10-28
- Id
dc1286e933387c13ed87fcf8
How it went
No other operator has reported using it yet.
Diff
raw · crates/desktop/artcraft/src/core/lifecycle/startup/setup_main_window.rs
@@ -12,10 +12,19 @@ pub async fn setup_main_window( .title("ArtCraft") .resizable(true) .fullscreen(false)- .background_color(Color(0, 0, 0, 0)) .enable_clipboard_access() .inner_size(2400.0, 1300.0); + // Tauri passes this color to WebKitGTK as the webview background. An alpha+ // of zero creates a transparent webview surface, which WebKitGTK can fail+ // to composite on Wayland (leaving only video layers visible). The app+ // draws its own background, so use an opaque color matching --st-bg.+ #[cfg(target_os = "linux")]+ let win_builder = win_builder.background_color(Color(18, 19, 22, 255));++ #[cfg(not(target_os = "linux"))]+ let win_builder = win_builder.background_color(Color(0, 0, 0, 0));+ #[cfg(target_os = "macos")] let win_builder = win_builder .decorations(true) // NB: Mac requires decorations. Tons of capabilities disappear otherwise.