]> git.mdlowis.com Git - proto/labwc.git/commitdiff
output: access texture width/height directly
authorJohan Malm <jgm323@gmail.com>
Mon, 17 May 2021 18:55:57 +0000 (19:55 +0100)
committerJohan Malm <jgm323@gmail.com>
Mon, 17 May 2021 18:55:57 +0000 (19:55 +0100)
wlr_texture_get_size() is removed in wlroots@6369f709 so we have to
access width and height directly.

src/output.c

index 8b5342ce21d3b8129b2027920ff19b960b7fb364..9207f8149bba4b0ec660e15a65105b8bd7df8938 100644 (file)
@@ -405,8 +405,10 @@ render_icon(struct output *output, pixman_region32_t *output_damage,
                struct wlr_box *box, struct wlr_texture *texture)
 {
        /* centre-align icon if smaller than designated box */
-       struct wlr_box button;
-       wlr_texture_get_size(texture, &button.width, &button.height);
+       struct wlr_box button = {
+               .width = texture->width,
+               .height = texture->height,
+       };
        if (box->width > button.width) {
                button.x = box->x + (box->width - button.width) / 2;
        } else {