git.lucas.co / cce-compositor
Wayland compositor (wlroots)
git clone https://git.lucas.co/cce-compositor.git

commit51627ef80671f8bc197f5fb5d20ad8de3d7304ec
parent18feea978f
authorLucas Galante <[email protected]>
date2026-09-18 00:57
fix(borders): scale the handle discs by the output scale

The frame node's render pass handed `band` and `corner_radius` (and the
retired lengths) to the shader in node-local logical px while the shader
works in buffer px, so on a scale-2 output the discs drew at half their
logical size — 16px for handle_width 32 — and smaller than the hit zone,
which is sized in logical px. They take data->scale now, as the bevel's
thickness and the frame's own exclusion rect already did. Verified in a
--scale 2 shadow: the top disc spans 64 buffer px, i.e. 32 logical.

Co-Authored-By: Claude Fable 5.1 <[email protected]>

 scenefx/types/scene/wlr_scene.c | 18 ++++++++++++------
 1 file changed, 12 insertions(+), 6 deletions(-)

diff --git a/scenefx/types/scene/wlr_scene.c b/scenefx/types/scene/wlr_scene.c
index 1aa2e85..9f9bb0f 100644
--- a/scenefx/types/scene/wlr_scene.c
+++ b/scenefx/types/scene/wlr_scene.c
@@ -2926,14 +2926,20 @@ static void scene_entry_render(struct render_list_entry *entry, const struct ren
 
 		struct fx_render_frame_options frame_options = {
 			.box = dst_box,
-			.corner_radius = scene_frame->corner_radius,
-			.band = scene_frame->band,
-			.band_min = scene_frame->band_min,
-			.corner_len = scene_frame->corner_len,
-			.gap = scene_frame->gap,
+			/* Lengths are node-local logical px, like the bevel's
+			 * thickness and the exclusion rect below; the shader works
+			 * in buffer px, so every one takes the output scale. Left
+			 * unscaled, the handles drew at half size on a scale-2
+			 * output — and smaller than the compositor's hit zone,
+			 * which is sized in logical px. */
+			.corner_radius = scene_frame->corner_radius * data->scale,
+			.band = scene_frame->band * data->scale,
+			.band_min = scene_frame->band_min * data->scale,
+			.corner_len = scene_frame->corner_len * data->scale,
+			.gap = scene_frame->gap * data->scale,
 			.hovered = scene_frame->hovered,
 			.swell_curve = scene_frame->swell_curve,
-			.bulge = scene_frame->bulge,
+			.bulge = scene_frame->bulge * data->scale,
 			.exclusion = {
 				scene_frame->exclusion[0] * data->scale,
 				scene_frame->exclusion[1] * data->scale,