view: Align large views to usable area

This commit is contained in:
John Lindgren 2023-02-19 09:56:58 -05:00
parent 5062c5bea3
commit 612c296d52

View file

@ -260,11 +260,11 @@ view_compute_centered_position(struct view *view, struct output *output,
*y = usable.y + (usable.height - height) / 2; *y = usable.y + (usable.height - height) / 2;
/* If view is bigger than usable area, just top/left align it */ /* If view is bigger than usable area, just top/left align it */
if (*x < 0) { if (*x < usable.x) {
*x = 0; *x = usable.x;
} }
if (*y < 0) { if (*y < usable.y) {
*y = 0; *y = usable.y;
} }
#if HAVE_XWAYLAND #if HAVE_XWAYLAND