make GCC a bit happier

This commit is contained in:
speedie 2023-04-01 15:03:42 +02:00
parent 37a48da018
commit 0a3c36fcd9
2 changed files with 9 additions and 5 deletions

View file

@ -377,7 +377,7 @@ drawmenu(void)
// why have an empty line?
if ((hideprompt && hideinput && hidemode && hidematchcount
#if USEIMAGE
) && !image || hideimage) {
) && (!image || hideimage)) {
#else
)) {
#endif

View file

@ -345,19 +345,23 @@ resizetoimageheight(int imageheight)
lines = reallines;
int wtr = 0;
if (lines * bh < imageheight + imagegaps * 2)
if (lines * bh < imageheight + imagegaps * 2) {
lines = (imageheight + imagegaps * 2) / bh;
}
if (hideprompt && hideinput && hidemode && hidematchcount)
if (hideprompt && hideinput && hidemode && hidematchcount) {
wtr = bh;
}
mh = MAX((lines + 1) * bh, ((lines + 1) * bh) - wtr);
if (mh - bh < imageheight + imagegaps * 2)
if (mh - bh < imageheight + imagegaps * 2) {
mh = (imageheight + imagegaps * 2 + bh) - wtr;
}
if (!win || omh == mh)
if (!win || omh == mh) {
return;
}
XResizeWindow(dpy, win, mw, mh);
drw_resize(drw, mw, mh);