From 612c296d5291f4700fc44bbbaaeb70081621d071 Mon Sep 17 00:00:00 2001 From: John Lindgren Date: Sun, 19 Feb 2023 09:56:58 -0500 Subject: [PATCH] view: Align large views to usable area --- src/view.c | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/src/view.c b/src/view.c index 591595b5..2ff89055 100644 --- a/src/view.c +++ b/src/view.c @@ -260,11 +260,11 @@ view_compute_centered_position(struct view *view, struct output *output, *y = usable.y + (usable.height - height) / 2; /* If view is bigger than usable area, just top/left align it */ - if (*x < 0) { - *x = 0; + if (*x < usable.x) { + *x = usable.x; } - if (*y < 0) { - *y = 0; + if (*y < usable.y) { + *y = usable.y; } #if HAVE_XWAYLAND