apply last commit to wayland resizetoimageheight() function as well

This commit is contained in:
speedie 2023-06-11 19:34:10 +02:00
parent c0d8adec85
commit a90c94f69d

View file

@ -335,7 +335,6 @@ void jumptoindex(unsigned int index) {
} }
void resizetoimageheight(int imagewidth, int imageheight) { void resizetoimageheight(int imagewidth, int imageheight) {
//int ih = imageheight;
int ih = imlib_image_get_height(); int ih = imlib_image_get_height();
#if USEX #if USEX
@ -460,22 +459,13 @@ void resizetoimageheight_x11(int imageheight) {
void resizetoimageheight_wl(int imageheight) { void resizetoimageheight_wl(int imageheight) {
int omh = mh, olines = lines; int omh = mh, olines = lines;
lines = reallines; lines = reallines;
int wtr = 0;
if (lines * bh < imageheight + imagegaps * 2) { if (lines * bh < imageheight + imagegaps * 2) {
lines = (imageheight + imagegaps * 2) / bh; lines = (imageheight + imagegaps * 2) / bh;
} }
if (hideprompt && hideinput && hidemode && hidematchcount) {
wtr = bh;
}
get_mh(); get_mh();
if (mh - bh < imageheight + imagegaps * 2) {
mh = (imageheight + imagegaps * 2 + bh) - wtr;
}
if (omh == mh) { if (omh == mh) {
return; return;
} }