mirror of
https://github.com/cage-kiosk/cage.git
synced 2025-10-29 05:40:19 -04:00
Port 0.16 wlr_output_layout_get_box changes
Fixes memory leaks.
This commit is contained in:
parent
5818a32a99
commit
979ff58a24
3 changed files with 17 additions and 13 deletions
9
view.c
9
view.c
|
|
@ -88,12 +88,13 @@ view_center(struct cg_view *view, struct wlr_box *layout_box)
|
|||
void
|
||||
view_position(struct cg_view *view)
|
||||
{
|
||||
struct wlr_box *layout_box = wlr_output_layout_get_box(view->server->output_layout, NULL);
|
||||
struct wlr_box layout_box;
|
||||
wlr_output_layout_get_box(view->server->output_layout, NULL, &layout_box);
|
||||
|
||||
if (view_is_primary(view) || view_extends_output_layout(view, layout_box)) {
|
||||
view_maximize(view, layout_box);
|
||||
if (view_is_primary(view) || view_extends_output_layout(view, &layout_box)) {
|
||||
view_maximize(view, &layout_box);
|
||||
} else {
|
||||
view_center(view, layout_box);
|
||||
view_center(view, &layout_box);
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue