mirror of
https://github.com/labwc/labwc.git
synced 2026-03-16 05:33:50 -04:00
src/osd.c: Free buf.buf as its malloc'd in buf_init()
This commit is contained in:
parent
bda48da68d
commit
ae9314c65e
1 changed files with 3 additions and 3 deletions
|
|
@ -103,6 +103,8 @@ osd_update(struct server *server)
|
||||||
|
|
||||||
struct theme *theme = server->theme;
|
struct theme *theme = server->theme;
|
||||||
|
|
||||||
|
struct buf buf;
|
||||||
|
buf_init(&buf);
|
||||||
struct output *output;
|
struct output *output;
|
||||||
wl_list_for_each(output, &server->outputs, link) {
|
wl_list_for_each(output, &server->outputs, link) {
|
||||||
destroy_osd_nodes(output);
|
destroy_osd_nodes(output);
|
||||||
|
|
@ -168,10 +170,7 @@ osd_update(struct server *server)
|
||||||
|
|
||||||
pango_cairo_update_layout(cairo, layout);
|
pango_cairo_update_layout(cairo, layout);
|
||||||
|
|
||||||
struct buf buf;
|
|
||||||
buf_init(&buf);
|
|
||||||
y = OSD_BORDER_WIDTH;
|
y = OSD_BORDER_WIDTH;
|
||||||
|
|
||||||
y += (OSD_ITEM_HEIGHT - font_height(&font)) / 2;
|
y += (OSD_ITEM_HEIGHT - font_height(&font)) / 2;
|
||||||
|
|
||||||
wl_list_for_each(view, &server->views, link) {
|
wl_list_for_each(view, &server->views, link) {
|
||||||
|
|
@ -221,4 +220,5 @@ osd_update(struct server *server)
|
||||||
wlr_scene_node_set_position(&scene_buffer->node, lx, ly);
|
wlr_scene_node_set_position(&scene_buffer->node, lx, ly);
|
||||||
wlr_scene_node_set_enabled(&output->osd_tree->node, true);
|
wlr_scene_node_set_enabled(&output->osd_tree->node, true);
|
||||||
}
|
}
|
||||||
|
free(buf.buf);
|
||||||
}
|
}
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue