Fix blur my shell compatibility and Xwayland as well - #165
Open
kem-a wants to merge 3 commits into
Open
Conversation
The rounded corners effect is a Shell.GLSLEffect, which is an offscreen effect: everything inside the actor it is attached to gets redirected into a fresh offscreen framebuffer. It used to be attached to the whole window actor on Wayland, and to WindowActor.first_child on X11. Both are wrong when another extension puts an actor inside the window actor. Blur my Shell inserts a blur actor at index 0 of the window actor, and that actor samples whatever has already been painted behind it. On Wayland it ended up inside our empty offscreen framebuffer with nothing to sample, so the blur disappeared and the window was left plainly transparent. On X11 it was even worse: since the blur actor is the first child, the corner shader was applied to the blur widget instead of the window contents. Attach the effect to the surface actor instead, which holds the actual window contents and no foreign actors. MetaSurfaceActor is not exposed to introspection, so it is found by skipping StWidgets: actors injected by other extensions are always StWidgets, while the surface actor never is. The readiness check in applyEffectTo now waits for that same actor. It listens for `child-added` rather than `notify::first-child`, because when another extension has already inserted an actor below the window contents, adding the surface actor doesn't change the first child. Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
Fix blur my shell compatibility and Xwayland as well
Owner
|
Thanks! Seems like this is similar to #77, but that PR has an issue with fractional scaling. Did you test your changes with it? |
Author
|
@flexagoon, yes, I did test it with fractional scaling, not all possible combinations, but some. My laptop has 4k screen, wayland and thus 1.5x scaling, not even standard 1.6x. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Rounded corners break Blur my Shell's window blur: blurred windows lose the blur and are left plainly transparent.
The effect is a
Shell.GLSLEffect, i.e. an offscreen effect, and was attached to the whole window actor on Wayland and toWindowActor.first_childon X11. Blur my Shell inserts its blur actor at index 0 of the window actor, and that actor samples what has already been painted behind it. On Wayland it ended up inside the (empty) offscreen framebuffer with nothing to sample; on X11 it was the first child, so the corner shader was applied to the blur widget instead of the window contents.This attaches the effect to the surface actor instead.
MetaSurfaceActorisn't introspectable, so it's matched by skipping injected actors, which are alwaysStWidgets.Tested on GNOME Shell 50.3 (Wayland) with Blur my Shell (v72), on both native Wayland and XWayland windows, plus maximize/unmaximize, overview, and disable/enable.
Shell patch to fix corners also was applied
*AI coauthored