we must ALWAYS remove 2 * borderwidth and 2 * sp from menu width (mw)

This commit is contained in:
speedie 2023-04-07 14:43:45 +02:00
parent 0753a2ec69
commit fcd52fa1c2
3 changed files with 5 additions and 5 deletions

View file

@ -79,6 +79,6 @@ resizeclient(void)
// no window/invalid window or menu height we had before is the same as the current window height
if (!win || omh == mh) return;
XResizeWindow(dpy, win, mw, mh);
drw_resize(drw, mw, mh);
XResizeWindow(dpy, win, mw - 2 * sp - borderwidth * 2, mh);
drw_resize(drw, mw - 2 * sp - borderwidth * 2, mh);
}

View file

@ -402,8 +402,8 @@ drawmenu(void)
if (!win) return;
XResizeWindow(dpy, win, mw, mh);
drw_resize(drw, mw, mh);
XResizeWindow(dpy, win, mw - 2 * sp - 2 * borderwidth, mh);
drw_resize(drw, mw - 2 * sp - 2 * borderwidth, mh);
}
#if USEIMAGE
else if (hideprompt && hideinput && hidemode && hidematchcount) {

View file

@ -658,7 +658,7 @@ setupdisplay(void)
}
// resize and draw
drw_resize(drw, mw, mh);
drw_resize(drw, mw - 2 * sp - borderwidth * 2, mh);
drawmenu();
}