From cee83f66775caf805369bc8d6b63fd6de9bd1402 Mon Sep 17 00:00:00 2001 From: speedie Date: Fri, 21 Apr 2023 09:51:51 +0200 Subject: [PATCH] last commit.. again --- libs/img.c | 5 ++--- libs/key.c | 1 - 2 files changed, 2 insertions(+), 4 deletions(-) diff --git a/libs/img.c b/libs/img.c index ae8c0a8..e331be7 100644 --- a/libs/img.c +++ b/libs/img.c @@ -25,7 +25,6 @@ setimagesize(int width, int height) return; } - calcoffsets(); drawmenu(); } @@ -330,7 +329,9 @@ void jumptoindex(unsigned int index) { unsigned int i; sel = curr = matches; + calcoffsets(); + for (i = 1; i < index; ++i) { if(sel && sel->right && (sel = sel->right) == next) { curr = next; @@ -430,7 +431,6 @@ resizetoimageheight(int imageheight) return; } - //XResizeWindow(dpy, win, mw - 2 * sp - borderwidth, mh); XMoveResizeWindow(dpy, win, x, y, mw - 2 * sp - borderwidth, mh); drw_resize(drw, mw - 2 * sp - borderwidth, mh); @@ -445,7 +445,6 @@ resizetoimageheight(int imageheight) jumptoindex(i); } - calcoffsets(); drawmenu(); } #endif diff --git a/libs/key.c b/libs/key.c index 5bcaa96..9c958dd 100644 --- a/libs/key.c +++ b/libs/key.c @@ -52,7 +52,6 @@ keypress(XEvent *e) allowkeys = !allowkeys; } - calcoffsets(); drawmenu(); } }