output: access texture width/height directly

wlr_texture_get_size() is removed in wlroots@6369f709 so we have to
access width and height directly.
This commit is contained in:
Johan Malm 2021-05-17 19:55:57 +01:00
parent 9769fad7a5
commit 892e93dd84

View 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 {