Commit b843494
committed
Fix wallpaper misalignment in overview when corner radius > 0
RoundedCornersEffect's pixel_step was derived from the physical monitor resolution (Main.layoutManager.monitors) instead of the actual size of the background actor the effect is attached to. This is a no-op for the real desktop background, which happens to match the monitor's resolution, but GNOME also creates smaller background actors for workspace previews/thumbnails in the overview, where backgroundActor.width/height is much smaller than the monitor. With corner radius 0 the mismatch is invisible since there's no rounding to distort; with radius > 0 the shader's pixel_step no longer matches the coordinate space bounds is expressed in, misaligning the rounded clip relative to the actual overview background.
Derive pixel_step from backgroundActor's own size at construction, and recompute it on every allocation change alongside the existing bounds recalculation, mirroring how bounds already handles actor-size changes.
Fixes #2391 parent 6783f7a commit b843494
1 file changed
Lines changed: 3 additions & 2 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
116 | 116 | | |
117 | 117 | | |
118 | 118 | | |
119 | | - | |
| 119 | + | |
120 | 120 | | |
121 | 121 | | |
122 | 122 | | |
| |||
135 | 135 | | |
136 | 136 | | |
137 | 137 | | |
138 | | - | |
| 138 | + | |
139 | 139 | | |
140 | 140 | | |
141 | 141 | | |
142 | 142 | | |
143 | 143 | | |
| 144 | + | |
144 | 145 | | |
145 | 146 | | |
146 | 147 | | |
| |||
0 commit comments