mirror of
https://github.com/cage-kiosk/cage.git
synced 2026-04-04 07:15:44 -04:00
view_get_geometry: only out width and height
This is the only thing we need, as we don't use a view's x and y coordinates for placing windows.
This commit is contained in:
parent
786e28bdac
commit
48f8f69556
3 changed files with 11 additions and 7 deletions
8
view.c
8
view.c
|
|
@ -43,11 +43,11 @@ view_center(struct cg_view *view)
|
|||
int output_width, output_height;
|
||||
wlr_output_effective_resolution(output, &output_width, &output_height);
|
||||
|
||||
struct wlr_box geom;
|
||||
view->get_geometry(view, &geom);
|
||||
int width, height;
|
||||
view->get_geometry(view, &width, &height);
|
||||
|
||||
view->x = (output_width - geom.width) / 2;
|
||||
view->y = (output_height - geom.height) / 2;
|
||||
view->x = (output_width - width) / 2;
|
||||
view->y = (output_height - height) / 2;
|
||||
}
|
||||
|
||||
bool
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue