Put geom checks after adjust for non-multi also

This commit is contained in:
John Vogel 2014-06-01 09:21:06 -04:00
parent 8a7015fce2
commit 99e927ee70
1 changed files with 6 additions and 6 deletions

12
bar.c
View File

@ -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);
}