mirror of
https://github.com/labwc/labwc.git
synced 2025-11-04 13:30:07 -05:00
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:
parent
9769fad7a5
commit
892e93dd84
1 changed files with 4 additions and 2 deletions
|
|
@ -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 {
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue