From d83c58919f874337dacddf7f2cec0bdd094a2c45 Mon Sep 17 00:00:00 2001 From: Johan Malm Date: Mon, 26 Sep 2022 20:16:43 +0100 Subject: [PATCH] view: no gap for top/left align big window On initial positioning of toplevel windows we call view_center(). During the centering process, if it turns out that the view is larger than the output usable-area then we just top/left align it with no gap. Relates to the gap aspect of issue #403 Reported-by: @Flrian --- src/view.c | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/src/view.c b/src/view.c index d6c92de9..9445282e 100644 --- a/src/view.c +++ b/src/view.c @@ -275,11 +275,11 @@ view_compute_centered_position(struct view *view, int w, int h, int *x, int *y) *y = usable.y + (usable.height - height) / 2; /* If view is bigger than usable area, just top/left align it */ - if (*x < rc.gap) { - *x = rc.gap; + if (*x < 0) { + *x = 0; } - if (*y < rc.gap) { - *y = rc.gap; + if (*y < 0) { + *y = 0; } #if HAVE_XWAYLAND