Skip to content

fix(linux): turn off WebKitGTK's DMABUF renderer under Wayland - #742

Merged
EVWorth merged 1 commit into
mainfrom
claude/fix-726-wayland-resize
Oct 5, 2026
Merged

EVWorth merged 1 commit into
mainfrom
claude/fix-726-wayland-resize

Conversation

@EVWorth

@EVWorth EVWorth commented Oct 4, 2026

Copy link
Copy Markdown
Owner

Refs #726. It doesn't auto-close the issue because this hasn't been confirmed on the reporting machine yet (see Needs confirming).

Problem

On Wayland (Bazzite/KDE, 1.1.0), making the window larger leaves the new area black and the content stuck at its old size. The same page reflows normally in just dev-web, so the problem is the webview surface, not the app's CSS.

Change

WebKitGTK's DMABUF renderer is known to leave its surface unresized under some Wayland compositor and GPU-driver combinations, which is what this looks like. The shared-memory renderer doesn't have that problem.

  • run() now sets WEBKIT_DISABLE_DMABUF_RENDERER=1 on Linux before the webview is created, when the session is Wayland (WAYLAND_DISPLAY is non-empty or XDG_SESSION_TYPE=wayland).
  • X11 keeps WebKitGTK's default renderer.
  • A value the user has already set always wins, including WEBKIT_DISABLE_DMABUF_RENDERER=0 to opt back in to DMABUF.
  • The decision is a small pure function, linux_webkit_env, compiled only on Linux and in tests so macOS and Windows get no dead-code warning. It has unit tests for Wayland (both detection paths), X11, an empty WAYLAND_DISPLAY, and a user override.

Tradeoff: the shared-memory renderer can use a bit more CPU when drawing large animated areas. For a database GUI that should be negligible, and anyone affected can opt out with the variable.

Needs confirming

I couldn't run the packaged window here because this container has no display. Before merging, it's worth checking on the Bazzite machine:

  1. Launch 1.1.0 as WEBKIT_DISABLE_DMABUF_RENDERER=1 sqlpilot and resize. If the black area is gone, this PR is the fix.
  2. If it's still black, try WEBKIT_DISABLE_COMPOSITING_MODE=1 as well. If only that helps, I'll switch this PR to set that variable instead.

Verification

  • cargo test -p sqlpilot --lib: 61 pass, including the 3 new tests.
  • cargo clippy --all-targets --all-features -D warnings on the full workspace (GTK/WebKitGTK dev libraries installed): clean. cargo fmt --check: clean.

🤖 Generated with Claude Code

https://claude.ai/code/session_01SCNjpC4VgppHSFs7P6rkZg


Generated by Claude Code

On Wayland, growing the window left the new area black and the content
at its old size (#726), while the same page reflowed normally in a
browser tab. That points at the webview surface, not the app's CSS.
WebKitGTK's DMABUF renderer is known to leave its surface unresized
under some Wayland compositors and drivers, and the shared-memory
renderer it falls back to does not.

run() now sets WEBKIT_DISABLE_DMABUF_RENDERER=1 before the webview is
created when the session is Wayland (WAYLAND_DISPLAY non-empty or
XDG_SESSION_TYPE=wayland). X11 keeps WebKitGTK's default, and a value
the user already set, including 0 to opt back in, is never overridden.
The decision is a pure function over the environment, unit-tested for
Wayland, X11, and a user override.

Refs #726. Not verified on the reporting machine: this container has
no display.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
Claude-Session: https://claude.ai/code/session_01SCNjpC4VgppHSFs7P6rkZg
@EVWorth
EVWorth merged commit 5bb90de into main Oct 5, 2026
12 checks passed
@EVWorth
EVWorth deleted the claude/fix-726-wayland-resize branch October 5, 2026 01:02
@EVWorth EVWorth mentioned this pull request Oct 5, 2026
EVWorth added a commit that referenced this pull request Oct 5, 2026
Version bump across the three manifests and the two lockfile entries
that record the app's own version.

What 1.2.0 contains since 1.1.0:

- Each editor tab runs on its own server session, so SET @var,
  temporary tables and multi-run transactions carry across runs (#734)
- Separate connection lanes for the agent and for backups/restores, so
  neither can starve the editor; the pool-exhausted message says what
  is holding the pool (#732, #727)
- Copy button beside Expand for long cell values, such as SHOW CREATE
  TABLE (#748)
- Linux/Wayland: WebKitGTK's DMABUF renderer is turned off, for the
  black area left after resizing the window (#742)
- Tauri 2.12 on both the npm and Rust sides (#749), and the dependency
  roll-up in #740
- rustls TLS 1.3 advisory RUSTSEC-2026-0285 patched (#728)

Also the first release built with rustup in place of
dtolnay/rust-toolchain (#746), so the release jobs' toolchain step runs
on Windows and macOS for the first time.


Claude-Session: https://claude.ai/code/session_01SCNjpC4VgppHSFs7P6rkZg

Co-authored-by: Claude <[email protected]>
EVWorth added a commit that referenced this pull request Oct 20, 2026
* release: 1.3.0

Version bump across the three manifests and the two lockfile entries
that record the app's own version.

1.2.0 and 1.2.1 were bumped but never tagged, so 1.3.0 is the first
release since 1.1.0 and carries everything since it:

Connections (#731)
- Each editor tab runs on its own server session, so SET @var, SET
  SESSION, temporary tables and multi-run transactions carry over (#734)
- Each agent session, and each backup or restore, has connections of its
  own, so none of them can hold up the editor or each other (#732, #770)
- The Min/Max pool size setting and the status-bar pool counter are gone;
  connections are no longer something to size (#769)
- A "busy" error says what is busy and what to wait for (#727)

Grid
- Grid edits save on the tab's session without committing its open
  transaction (#762)
- Copy a long cell value without opening the viewer (#748)

Fixes
- Linux: WebKitGTK's DMABUF renderer is off under Wayland (#742)
- rustls for RUSTSEC-2026-0285 and RUSTSEC-2026-0346..0349 (#728, #759)
- Tauri 2.12.3, tauri-plugin-updater 2.13.3, tauri-plugin-shell 2.5.0
  (#749, #747, #758), and dependency roll-ups

Co-Authored-By: Claude Opus 5.5 <[email protected]>
Claude-Session: https://claude.ai/code/session_01WTypK4RjzzdjoFxd3qk14g

* fix(deps): bump rustls-webpki and webpki-roots for RUSTSEC-2026-0381..0383

rustls-webpki 0.103.16, webpki-roots and webpki-root-certs 1.0.10. The
advisories were published today: certificate verification could accept
distrusted intermediates, and the bundled roots still trusted the
distrusted emSign intermediates. cargo audit fails on all three, and a
release should not ship them.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
Claude-Session: https://claude.ai/code/session_01WTypK4RjzzdjoFxd3qk14g

---------

Co-authored-by: Claude <[email protected]>
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