Repository navigation
Studio: restore real Glass on the Linux app (live blur, fills, strength and the Windows-style title bar) - #17387
Conversation
unslothai#16957 and unslothai#17327 turned off every live Glass blur on WebKitGTK and replaced it with dense or opaque fills. With a GPU that blur costs nothing measurable, and without it Glass on Linux is a flat tint: the sidebar, composer, menus and dialogs no longer frost what is behind them, and Glass strength has nothing left to change. Remove the no-blur rule and every fill that compensated for it, so Linux Glass uses the same blur, fills and strength as other platforms. Kept from those changes, still under data-glass-cpu: Frosted's grain tile stays off and Liquid 3D's wide glows stay gradients, since both are paint costs that do not depend on the blur. The pause-blur-while-moving path for software compositing no longer skips WebKitGTK, which it did only because there was no blur to pause.
The composer and the files panel each hold a "Drop files here" overlay that sits at opacity 0 with its own backdrop blur until a file is dragged. WebKitGTK stops drawing a Glass surface's own backdrop blur while a hidden child of it carries a backdrop-filter, so the composer showed the wallpaper sharp behind a tint while the sidebar, which has no such child, frosted it. The overlays now take their blur only in the states that show them.
Linux uses the same in-page title bar as Windows, but three parts of its Glass layout were switched on for Windows only: the frame that joins the title bar strip and the pinned sidebar into one frosted surface, the browser pane's single glass layer below the caption, and the wallpaper blur behind non-chat pages. On Linux the strip behind the window buttons was bare wallpaper. All three now key on the in-page title bar instead of on Windows. The data-windows-* attribute names are unchanged.
|
@codex review |
Codex Review Summary: ✅ CompletedThis comment shows the latest Codex review activity on this pull request.
ℹ️ About Codex in GitHubYour team has set up Codex to review pull requests in this repo. Reviews are triggered when you
Codex reacts with 👀 while any review is running, comments if it has suggestions, and reacts with 👍 once all reviews finish with no findings. |
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: 4ddf42cf93
ℹ️ About Codex in GitHub
Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you
- Open a pull request for review
- Mark a draft as ready
- Comment "@codex review".
If Codex has suggestions, it will comment; otherwise it will react with 👍.
Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".
The shared title bar frame is a pseudo-element that also takes Frosted's grain tile. Linux now uses that frame, and the WebKitGTK no-grain rule listed only the sidebar, composer and files panel, so the grain came back on the frame with a pinned sidebar. Clear it there too, and have the test check every surface the grain rule paints.
Conflicts with unslothai#17380, which changed the WebKitGTK side-pane fill inside the no-blur block this branch removes: - index.css: keep the block removed. The sheen and greeting halo fixes from unslothai#17380 sit outside it and merge as they are. - glass-webkit-blur.test.ts: keep this branch's rewritten tests and main's two sheen tests; drop the tests for the removed fills.
|
@codex review |
|
Codex Review: Didn't find any major issues. 👍 Reviewed commit: ℹ️ About Codex in GitHubYour team has set up Codex to review pull requests in this repo. Reviews are triggered when you
If Codex has suggestions, it will comment; otherwise it will react with 👍. Codex can also answer questions or update the PR. Try commenting "@codex address that feedback". |
Since #16957 and #17327, Glass on the Linux desktop app has no live blur at all: every glass surface is a dense or opaque fill. On a machine with a GPU that trade buys nothing and Glass stops looking like glass:
This removes the WebKitGTK no-blur rule and every fill that compensated for it, so Linux Glass uses the same blur, fills and strength as macOS and Windows again.
Kept from those PRs, still under
data-glass-cpu, because they are paint costs that do not depend on the blur:feTurbulenceredrawn on every paint) stays off.Software compositing. The pause-blur-while-moving path (#17007) skipped WebKitGTK only because there was no blur left to pause; it no longer does. One limit: WebKitGTK masks the WebGL renderer string ("Apple GPU"), so
softwareCompositing()only reports true there when WebGL is unavailable or the documented override is set. It does not see llvmpipe.The composer's blur was never drawn on Linux (second commit). With the blur back, the sidebar frosted the wallpaper but the composer showed it sharp behind a tint, although both compute the same
backdrop-filter. The composer and the files panel each hold a "Drop files here" overlay that sits atopacity: 0with its ownbackdrop-blur-smuntil a file is dragged, and WebKitGTK stops drawing a surface's own backdrop blur while a hidden child of it carries abackdrop-filter. The overlays now take their blur only in the states that show them. In the real app, edge detail behind the composer goes from 24.0 to 1.6 (sidebar 0.8, bare wallpaper 35.2), and putting the hidden overlay's blur back on the live element returns it to 24.0. Newtests/glass-hidden-overlay-blur.test.tspins it.The Linux title bar now matches Windows (third commit). Linux uses the same in-page title bar as Windows, but three parts of its Glass layout were switched on for Windows only: the frame that joins the title bar strip and the pinned sidebar into one frosted surface with a rounded inner corner, the browser pane's single glass layer below the caption, and the wallpaper blur behind non-chat pages. On Linux the strip behind the window buttons was bare wallpaper. All three now key on
shouldUseCustomWindowTitlebar()instead of a Windows check; thedata-windows-*attribute names are unchanged. On a rebuilt copy of the Linux page in WebKitGTK 2.54.2 the frame draws as on Windows (itsmaskandbackdrop-filteron one pseudo-element work there), and that build supports the CSS anchor positioning the page layout uses. The look was checked by eye in the running Linux app against Windows screenshots.Measurements, native Tauri dev build, WebKitGTK 2.54.2, KDE Wayland, Liquid Glass 3D over a wallpaper image, 600-message thread, 238 scripted scroll frames, three alternating runs each:
So with a GPU the live blur is free here, and without one this PR costs about 5 ms a frame on a fast desktop CPU, more on a slower one. That cost is the trade-off of this change. With the motion pause on, scrolling is back to 16 ms and the blur returns at rest, so a reliable software-rendering signal for WebKitGTK (for example from the shell) would close the gap as a follow-up.
Validation:
blur(...) saturate(...)with translucent fills again, and follow Glass strength.tests/glass-webkit-blur.test.tsrewritten: the flag may only swap paint costs (no rule under it touches a blur, a fill or the strength variables); the grain and glow rules are still pinned.tests/glass-motion.test.tsupdated for the gating. Full frontend suite (15,608) and the test typecheck pass.Not checked: the title bar change on Windows itself (the condition is still true there, so it should be unchanged), the drop overlays while a file is actually being dragged, light theme, Frosted and Blurred styles, a real host without a GPU (software GL was forced on a GPU machine), and the AppImage build.
Relation to #17380: that PR's side-pane fill change edits a rule this PR deletes, so whichever lands second needs a small rebase. Its black tab strip came from the opaque fill removed here. Its sheen fix is still needed, since the stripes do not depend on the blur.