warpdotdev / Warp

Warp is a modern, Rust-based terminal with AI built in so you and your team can build great software, faster.
https://warp.dev
Other
21.37k stars 373 forks source link

Blurred background on Wayland #5457

Open alvgaona opened 3 hours ago

alvgaona commented 3 hours ago

Dupe Check

Describe the solution you'd like?

The solution I'd like is pretty straightforward. Enable blurred background support on Wayland. I think it's not supported by X11 but it is on Wayland. Other popular apps do this on Linux.

Is your feature request related to a problem? Please describe.

Not really a problem.

Additional context

What an LLM told me:

To achieve a blurred background effect for a Linux desktop app on Wayland, you have a few approaches depending on your toolkit and compositor:

1. If using GTK4:

// Set window transparent
gtk_widget_set_opacity(window, 0.9);

// Enable blur using portal (if supported by compositor)
GtkWindow *window;
gtk_window_set_blur_background(window, TRUE);

2. If using Qt:
// Enable transparency
window->setAttribute(Qt::WA_TranslucentBackground);

// Set blur hint using KWindowEffects (KDE)
KWindowEffects::enableBlurBehind(window->winId(), true);

3. Using pure Wayland protocol:
You'll need to implement the `kde-blur` or `wlr-layer-shell` protocol. Here's a basic example:

// Request blur via compositor protocol
struct zwlr_layer_surface_v1 *surface;
zwlr_layer_surface_v1_set_blur(surface, true);

Note that blur support depends on your Wayland compositor:
- KDE Plasma (KWin) supports it well
- GNOME requires extensions
- Sway/wlroots-based compositors may have varying support

The most reliable approach is checking compositor capabilities at runtime and gracefully falling back when blur isn't supported.

How important is this feature to you?

1 (Not too important)

Warp Internal (ignore) - linear-label:39cc6478-1249-4ee7-950b-c428edfeecd1

None

alvgaona commented 3 hours ago

Has a bit more context than #4386