Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion resources/metadata.json
Original file line number Diff line number Diff line change
Expand Up @@ -6,5 +6,5 @@
"url": "https://github.com/yilozt/rounded-window-corners",
"gettext-domain": "rounded-window-corners@yilozt",
"settings-schema": "org.gnome.shell.extensions.rounded-window-corners",
"shell-version": ["45"]
"shell-version": ["46"]
}
6 changes: 4 additions & 2 deletions src/effect/rounded_corners_effect.ts
Original file line number Diff line number Diff line change
Expand Up @@ -57,15 +57,15 @@ export const RoundedCornersEffect = GObject.registerClass (
border_color: 0,
}
Object.keys (Effect.uniforms).forEach ((k) => {
if (!Effect.uniforms) return
if (!Effect.uniforms || Effect.uniforms[k as keyof Uniforms] !== 0)
return
Effect.uniforms[k as keyof Uniforms] = this.get_uniform_location (k)
})
}

vfunc_build_pipeline (): void {
const type = Shell.SnippetHook.FRAGMENT
this.add_glsl_snippet (type, declarations, code, false)
this._init_uniforms ()
}

vfunc_paint_target (node: Clutter.PaintNode, ctx: Clutter.PaintContext) {
Expand Down Expand Up @@ -143,6 +143,8 @@ export const RoundedCornersEffect = GObject.registerClass (
}
inner_radius *= radius / outer_radius

this._init_uniforms ()

const location = Effect.uniforms
this.set_uniform_float (location.bounds, 4, bounds)
this.set_uniform_float (location.inner_bounds, 4, inner_bounds)
Expand Down