From: Johan Malm Date: Mon, 17 May 2021 18:55:57 +0000 (+0100) Subject: output: access texture width/height directly X-Git-Url: https://git.mdlowis.com/?a=commitdiff_plain;h=892e93dd84c514b4e6f34a0fab01c727edd2d8de;p=proto%2Flabwc.git output: access texture width/height directly wlr_texture_get_size() is removed in wlroots@6369f709 so we have to access width and height directly. --- diff --git a/src/output.c b/src/output.c index 8b5342ce..9207f814 100644 --- a/src/output.c +++ b/src/output.c @@ -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 {