]> git.mdlowis.com Git - proto/labwc.git/commitdiff
osd-classic: fix miscalculation for osd width in percentage
authortokyo4j <hrak1529@gmail.com>
Sat, 1 Nov 2025 13:43:45 +0000 (22:43 +0900)
committerJohan Malm <johanmalm@users.noreply.github.com>
Sat, 1 Nov 2025 16:01:58 +0000 (16:01 +0000)
Fixes a regression in 75eb370.

src/osd/osd-classic.c

index 4cb9286769e802bfdf424b1f6566d30dadb70c09..7fd20357835c1082f01f236e3a2c4459bacc76ec 100644 (file)
@@ -86,7 +86,8 @@ osd_classic_create(struct output *output, struct wl_array *views)
 
        int w = switcher_theme->width;
        if (switcher_theme->width_is_percent) {
-               w = output->wlr_output->width * switcher_theme->width / 100;
+               w = output->wlr_output->width / output->wlr_output->scale
+                       * switcher_theme->width / 100;
        }
        int h = wl_array_len(views) * switcher_theme->item_height
                + 2 * rc.theme->osd_border_width + 2 * switcher_theme->padding;