Skip to content

feat(gpui): support Linux glass backgrounds on Wayland and X11 - #4

Merged
maddada merged 1 commit into
maddada:ghostexfrom
alp82:linux-transparency
Sep 27, 2026
Merged

maddada merged 1 commit into
maddada:ghostexfrom
alp82:linux-transparency

Conversation

@alp82

@alp82 alp82 commented Sep 27, 2026 •

Copy link
Copy Markdown

Linux previously ignored the window background APIs used by Ghostex’s glass settings. Implement them for Wayland and X11, with a WGPU backdrop pass matching the macOS background sources and eight live styles.

  • Support wallpaper, custom pictures, muted looping video, window-relative/desktop-relative placement, and crossfades.
  • Request compositor blur through Wayland background-effects/KDE blur protocols and the X11 KDE blur property.
  • Pause animation/video for inactive or hidden windows, display sleep, reduced motion, power saver, and battery-only restrictions. Decode images and FFmpeg video off the UI thread.
  • Discover wallpapers from Hyprpaper, swww/awww, GNOME, Cinnamon, MATE, and single-screen Plasma. Native Wayland desktop-relative placement uses Hyprland IPC; X11 uses window geometry.

Validation: Linux crate checks, full Ghostex release build and bundle, and WGSL validation passed on the original integration checkout. The user confirmed the result works in Hyprland (Ghostex uses XWayland for CEF). Native Wayland and a standalone Xorg session have not been visually tested. Compositor blur strength remains compositor-controlled.

Companion Ghostex PR: maddada/Ghostex#165 exposes the settings and pins this revision. After rebasing onto current upstream, cargo check -p gpui_linux -p gpui_wgpu also passed. No automated tests were added, per the repository instructions.

Note

Add Linux glass backgrounds for gpui on Wayland and X11

Adds a new glass backdrop system to the Linux gpui stack. A GPU renderer in glass.rs draws image, video, or procedural live backgrounds (aurora, nebula, bokeh, and others) into a 320x200 canvas and composites it into the target surface before the main scene pass in wgpu_renderer.rs.

  • A background worker in glass.rs loads wallpaper images, decodes videos via a looping FFmpeg child process (video.rs), and drives live-background animation with reduced-motion and battery policies.
  • Desktop integration in system.rs discovers wallpapers from Hyprpaper, swww, GNOME, and KDE, queries Hyprland IPC for monitor-relative cover bounds, and checks DPMS sleep state.
  • Both Wayland and X11 windows wire the PlatformWindow background setters to Glass state and request redraws while a background needs another frame; Wayland now prefers the standard background-effect protocol over the KDE blur manager.
  • Behavioral Change: WgpuRendererCore frame rendering switches the main pass from clear to load when glass is configured; check wgpu_renderer.rs. Video playback also spawns FFmpeg child processes that are killed on drop; check video.rs.

Macroscope summarized 8bd6c6e.

@coderabbitai

coderabbitai Bot commented Sep 27, 2026

Copy link
Copy Markdown

Important

Review skipped

Auto reviews are disabled on base/target branches other than the default branch.

Please check the settings in the CodeRabbit UI or the .coderabbit.yaml file in this repository. To trigger a single review, invoke the @coderabbitai review command.

⚙️ Run configuration

Configuration used: defaults

Review profile: CHILL

Plan: Advanced

Run ID: d7c5ba97-3890-455e-83ac-dfc9cc52d99d

You can disable this status message by setting the reviews.review_status to false in the CodeRabbit configuration file.

Use the checkbox below for a quick retry:

  • 🔍 Trigger review

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands.

@maddada
maddada merged commit 91d2a77 into maddada:ghostex Sep 27, 2026
30 checks passed
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