From 99e927ee702d59708960bc76aac9ec23833e4a87 Mon Sep 17 00:00:00 2001 From: John Vogel Date: Sun, 1 Jun 2014 09:21:06 -0400 Subject: [PATCH] Put geom checks after adjust for non-multi also --- bar.c | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/bar.c b/bar.c index e99ee66..847e443 100644 --- a/bar.c +++ b/bar.c @@ -825,12 +825,6 @@ init (void) } if (!monhead) { - /* Check the geometry */ - if (bx + bw > scr->width_in_pixels || by + bh > scr->height_in_pixels) { - fprintf(stderr, "The geometry specified doesn't fit the screen!\n"); - exit(EXIT_FAILURE); - } - /* If I fits I sits */ if (bw < 0) bw = scr->width_in_pixels - bx; @@ -839,6 +833,12 @@ init (void) if (bh < 0 || bh > scr->height_in_pixels) bh = main_font->height + bu + 2; + /* Check the geometry */ + if (bx + bw > scr->width_in_pixels || by + bh > scr->height_in_pixels) { + fprintf(stderr, "The geometry specified doesn't fit the screen!\n"); + exit(EXIT_FAILURE); + } + /* If no RandR outputs or Xinerama screens, fall back to using whole screen */ monhead = monitor_new(0, 0, bw, scr->height_in_pixels); }