Skip to content

fix(linux): make WebKit rendering reliable under Wayland#77

Draft
denolehov wants to merge 1 commit into
mainfrom
wayland
Draft

fix(linux): make WebKit rendering reliable under Wayland#77
denolehov wants to merge 1 commit into
mainfrom
wayland

Conversation

@denolehov

@denolehov denolehov commented Jun 21, 2026

Copy link
Copy Markdown
Owner

Updates:

  • Set WEBKIT_DISABLE_DMABUF_RENDERER in src-tauri/src/lib.rs (shell-level WEBKIT_* vars don't reach the WebKit process per Tauri #14427). Works around WebKit2GTK DMABUF renderer bugs that blur scrolled text and mis-size surfaces across various Linux GPU/compositor combos. WebKit bug 262607 is WONTFIX, so this knob is the supported escape hatch.

  • Export XDG_DATA_DIRS in the dev shell so GTK can find gsettings schemas for Wayland display-scale reporting; without this the WebView surface allocates at the wrong size. The installed-binary wrapper keeps GDK_BACKEND=x11 (no equivalent plumbing for a raw nix profile install).

  • Disable WebKitGTK smooth-scrolling via window.with_webview on the CLI and MCP review windows (added webkit2gtk = "2.0" as a Linux-only dep, matching wry's version). Wheel events scroll instantly instead of carrying momentum.

  • Strip backdrop-filter blur from header, session-slot, status-bar, and command-palette — those filters trigger continuous layout recalc on scroll and contribute to layout thrashing in long files.

  • Add .envrc + .direnv/ ignore for contributors who use direnv.

@denolehov

Copy link
Copy Markdown
Owner Author

@fraggerfox got some time to play around with the build on Linux (WSL). Could you please try this branch to see if the performance is ok?

Comment on lines -26 to -28
background: color-mix(in srgb, var(--bg-panel) 85%, transparent);
backdrop-filter: blur(20px) saturate(180%);
-webkit-backdrop-filter: blur(20px) saturate(180%);

Copy link
Copy Markdown
Owner Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

this should improve performance a bit

* Wire XDG_DATA_DIRS through both the dev shell (via shellHook) and the
  installed-binary wrapper (via --prefix) so GTK can find gsettings
  schemas for Wayland display-scale reporting; without this the WebView
  surface allocates at the wrong size. Installed binaries no longer
  need GDK_BACKEND=x11 as a fallback.

* Disable WebKitGTK smooth-scrolling via window.with_webview on the CLI
  and MCP review windows (added webkit2gtk = "2.0" as a Linux-only dep,
  matching wry's version). Wheel events scroll instantly instead of
  carrying momentum.

* Strip backdrop-filter blur from header, session-slot, status-bar, and
  command-palette — those filters trigger continuous layout recalc on
  scroll and contribute to layout thrashing in long files.

* Add .envrc + .direnv/ ignore for contributors who use direnv.
@fraggerfox

Copy link
Copy Markdown
Collaborator

@fraggerfox got some time to play around with the build on Linux (WSL). Could you please try this branch to see if the performance is ok?

I tested this out, did not find any issues with it, we can merge this and see how it goes.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants