Skip to content

chore: support GNOME 51 - #182

Closed
ely-id wants to merge 1 commit into
flexagoon:mainfrom
ely-id:gnome-51
Closed

ely-id wants to merge 1 commit into
flexagoon:mainfrom
ely-id:gnome-51

Conversation

@ely-id

@ely-id ely-id commented Oct 30, 2026

Copy link
Copy Markdown

GNOME Shell 51 removed Shell.GLSLEffect (porting guide), which all three effects of the extension were based on, so the extension doesn't work on 51. This ports them to the replacement APIs.

Changes

  • RoundedCornersEffect and ClipShadowEffect now extend Clutter.ShaderEffect and provide their shader through vfunc_get_static_snippet(). Uniforms are set by name with set_uniform_float(), so the manual uniform location cache is no longer needed.
  • LinearFilterEffect now extends Clutter.OffscreenEffect directly. It only needed the offscreen pipeline to change the texture filters (its GLSL snippet was empty).
  • metadata.json: shell-version is now ["51"]. The ShaderEffect snippet API is new in Mutter 51 (Mutter 50 only has get_static_shader_source), so supporting 50 at the same time would require runtime branching.

The snippet semantics match the old add_glsl_snippet(hook, declarations, code, false) call (same hook, code as post), checked against shell-glsl-effect.c from GNOME Shell 50.6 and clutter-shader-effect.c from Mutter 51.1.

Typings

@girs doesn't have GNOME 51 typings yet, so the set_uniform_float() calls carry @ts-expect-error directives. Once the typings are updated, tsc will flag them as unused so they can be removed. biome ci passes.

Testing

Tested manually on GNOME Shell 51.1 (Wayland):

  • rounded corners on a range of apps: Helium, Brave Origin, Grok Bot, Kiro Crew, GitHub Copilot, Todoist, Steam and Battle.net
  • window previews in the overview
  • workspace switching
  • preferences window (changing settings applies live)
  • alongside the Mosaic WM tiling extension

AI disclosure

This port was mostly written with Claude (Anthropic's AI assistant). I reviewed the changes and tested them manually on GNOME 51.1 as described above.

GNOME Shell 51 removed Shell.GLSLEffect. Port the effects that used it:

- RoundedCornersEffect and ClipShadowEffect now extend
  Clutter.ShaderEffect and provide their shader through
  vfunc_get_static_snippet(). Uniforms are set by name, so the manual
  uniform location cache is gone (Clutter caches locations itself).
- LinearFilterEffect never had real shader code, so it now extends
  Clutter.OffscreenEffect directly and keeps overriding paint_target to
  set the layer filters.
- metadata.json: shell-version ["51"]. The ShaderEffect snippet API does
  not exist in Mutter 50, so this build cannot support 50.

ShaderEffect.set_uniform_float() is not in the @Girs typings yet (they
stop at GNOME 50), so its calls carry @ts-expect-error directives that
will flag themselves for removal once the typings are updated.
@ely-id

ely-id commented Oct 30, 2026

Copy link
Copy Markdown
Author

Closing in favor of #175, which makes the same port and was opened earlier (I missed it before opening this one). For what it's worth, an equivalent port works fine here on GNOME 51.1 with the apps listed above.

@ely-id ely-id closed this Oct 30, 2026
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.

1 participant