diff options
author | Tim Wiederhake <twied@gmx.net> | 2024-01-20 16:07:00 +0100 |
---|---|---|
committer | Tim Wiederhake <twied@gmx.net> | 2024-01-20 16:07:00 +0100 |
commit | 783b31821d87ea551457f4700f796a51f359cfd1 (patch) | |
tree | 00ee2750f4ce1348b8661ffea760eca335648a66 /src/util.c | |
parent | c5a63751f8b4eab72794e56365ead929023f2b94 (diff) |
Remove global variables JunkWidth, JunkHeight, JunkBW, JunkDepth, JunkMask
Replace with a local variable following the naming scheme from
Identify() in src/menus.c.
Signed-off-by: Tim Wiederhake <twied@gmx.net>
Diffstat (limited to 'src/util.c')
-rw-r--r-- | src/util.c | 12 |
1 files changed, 8 insertions, 4 deletions
@@ -209,6 +209,7 @@ Zoom(Window wf, Window wt) long dx, dy, dw, dh; long z; int j; + unsigned udummy = 0; Window wdummy = None; if (!Scr->DoZoom || Scr->ZoomCount < 1) @@ -217,8 +218,8 @@ Zoom(Window wf, Window wt) if (wf == None || wt == None) return; - XGetGeometry(dpy, wf, &wdummy, &fx, &fy, &fw, &fh, &JunkBW, &JunkDepth); - XGetGeometry(dpy, wt, &wdummy, &tx, &ty, &tw, &th, &JunkBW, &JunkDepth); + XGetGeometry(dpy, wf, &wdummy, &fx, &fy, &fw, &fh, &udummy, &udummy); + XGetGeometry(dpy, wt, &wdummy, &tx, &ty, &tw, &th, &udummy, &udummy); dx = ((long) (tx - fx)); /* going from -> to */ dy = ((long) (ty - fy)); /* going from -> to */ @@ -280,12 +281,13 @@ void GetUnknownIcon(const char *name) { int dummy = 0; + unsigned udummy = 0; Window wdummy = None; if ((Scr->UnknownPm = GetBitmap(name)) != None) { XGetGeometry(dpy, Scr->UnknownPm, &wdummy, &dummy, &dummy, (unsigned int *) &Scr->UnknownWidth, - (unsigned int *) &Scr->UnknownHeight, &JunkBW, &JunkDepth); + (unsigned int *) &Scr->UnknownHeight, &udummy, &udummy); } } @@ -379,7 +381,9 @@ FindBitmap(const char *name, unsigned *widthp, unsigned *heightp) Pixmap GetBitmap(const char *name) { - return FindBitmap(name, &JunkWidth, &JunkHeight); + unsigned udummy = 0; + + return FindBitmap(name, &udummy, &udummy); } void |