dmenu.c.rej 479 B

123456789101112131415161718
  1. --- dmenu.c
  2. +++ dmenu.c
  3. @@ -644,11 +654,10 @@ setup(void)
  4. if (!XGetWindowAttributes(dpy, parentwin, &wa))
  5. die("could not get embedding window attributes: 0x%lx",
  6. parentwin);
  7. - x = 0;
  8. - y = topbar ? 0 : wa.height - mh;
  9. - mw = wa.width;
  10. + mw = MIN(MAX(max_textw() + promptw, 100), wa.width);
  11. + x = (wa.width - mw) / 2;
  12. + y = (wa.height - mh) / 2;
  13. }
  14. - promptw = (prompt && *prompt) ? TEXTW(prompt) - lrpad / 4 : 0;
  15. inputw = MIN(inputw, mw/3);
  16. match();