Fix blank WebKit window in Wayland AppImage sessions - #175
Merged
Conversation
2 tasks
Co-authored-by: zouyonghe <62183434+zouyonghe@users.noreply.github.com>
Co-authored-by: zouyonghe <62183434+zouyonghe@users.noreply.github.com>
Copilot
AI
changed the title
[WIP] Fix white screen issue in Wayland environment on ArchLinux
Fix blank WebKit window in Wayland AppImage sessions
Aug 31, 2026
zouyonghe
marked this pull request as ready for review
August 31, 2026 13:17
There was a problem hiding this comment.
Hey - I've found 1 issue
Prompt for AI Agents
Please address the comments from this code review:
## Individual Comments
### Comment 1
<location path="src-tauri/src/app_runtime.rs" line_range="8-18" />
<code_context>
#[cfg(target_os = "linux")]
mod linux_webkit_workaround {
+ const APPIMAGE_ENV: &str = "APPIMAGE";
+ const GDK_BACKEND_ENV: &str = "GDK_BACKEND";
const WEBKIT_DISABLE_DMABUF_RENDERER_ENV: &str = "WEBKIT_DISABLE_DMABUF_RENDERER";
const WAYLAND_DISPLAY_ENV: &str = "WAYLAND_DISPLAY";
+ fn should_set_gdk_backend_env(
+ existing_value: Option<&std::ffi::OsStr>,
+ wayland_display: Option<&std::ffi::OsStr>,
+ appimage: Option<&std::ffi::OsStr>,
+ ) -> bool {
+ existing_value.is_none() && wayland_display.is_some() && appimage.is_some()
+ }
+
</code_context>
<issue_to_address>
**issue (broader_impact):** The fallback recognizes only the `APPIMAGE` marker, so an AppImage-style launch that exposes `APPDIR` without `APPIMAGE` does not set `GDK_BACKEND=x11` and can still enter the bundled Wayland/EGL path. This is inconsistent with `is_linux_appimage_runtime`, which already treats either `APPIMAGE` or `APPDIR` as an AppImage runtime.
**Triggers:** When the AppImage runtime provides `APPDIR` but not `APPIMAGE`.
**Suggested fix:** Detect `APPDIR` as an AppImage marker as well, or reuse the existing Linux AppImage runtime detection helper.
</issue_to_address>Sourcery assessment
Approval pending. 1 finding to address first.
Blocking findings: src-tauri/src/app_runtime.rs:18
Help me be more useful! Please click 👍 or 👎 on each comment and I'll use the feedback to improve your reviews.
Member
|
@sourcery-ai review |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
AstrBot AppImage could open a blank window on KDE Plasma Wayland while
WebKitWebProcessaborted withEGL_BAD_PARAMETER; the backend remained reachable on localhost.GDK_BACKENDvalue.Summary by Sourcery
Fix Linux AppImage WebKit startup failures on Wayland by selecting a compatible GTK backend before desktop initialization.
Bug Fixes:
Enhancements:
Tests: