Skip to content

Commit 247dfed

Browse files
committed
Fix for Gnome 46
1 parent 9c6005c commit 247dfed

File tree

2 files changed

+6
-3
lines changed

2 files changed

+6
-3
lines changed

resources/metadata.json

+1-1
Original file line numberDiff line numberDiff line change
@@ -6,5 +6,5 @@
66
"url": "https://github.com/yilozt/rounded-window-corners",
77
"gettext-domain": "rounded-window-corners@yilozt",
88
"settings-schema": "org.gnome.shell.extensions.rounded-window-corners",
9-
"shell-version": ["45"]
9+
"shell-version": ["46"]
1010
}

src/effect/rounded_corners_effect.ts

+5-2
Original file line numberDiff line numberDiff line change
@@ -57,18 +57,19 @@ export const RoundedCornersEffect = GObject.registerClass (
5757
border_color: 0,
5858
}
5959
Object.keys (Effect.uniforms).forEach ((k) => {
60-
if (!Effect.uniforms) return
60+
if (!Effect.uniforms || Effect.uniforms[k as keyof Uniforms] !== 0)
61+
return
6162
Effect.uniforms[k as keyof Uniforms] = this.get_uniform_location (k)
6263
})
6364
}
6465

6566
vfunc_build_pipeline (): void {
6667
const type = Shell.SnippetHook.FRAGMENT
6768
this.add_glsl_snippet (type, declarations, code, false)
68-
this._init_uniforms ()
6969
}
7070

7171
vfunc_paint_target (node: Clutter.PaintNode, ctx: Clutter.PaintContext) {
72+
this._init_uniforms ()
7273
// Reset to default blend string.
7374
this.get_pipeline ()?.set_blend (
7475
'RGBA = ADD(SRC_COLOR, DST_COLOR*(1-SRC_COLOR[A]))'
@@ -143,6 +144,8 @@ export const RoundedCornersEffect = GObject.registerClass (
143144
}
144145
inner_radius *= radius / outer_radius
145146

147+
this._init_uniforms ()
148+
146149
const location = Effect.uniforms
147150
this.set_uniform_float (location.bounds, 4, bounds)
148151
this.set_uniform_float (location.inner_bounds, 4, inner_bounds)

0 commit comments

Comments
 (0)