summaryrefslogtreecommitdiff
path: root/src/util.c
diff options
context:
space:
mode:
authorTim Wiederhake <twied@gmx.net>2024-01-20 16:07:00 +0100
committerTim Wiederhake <twied@gmx.net>2024-01-20 16:07:00 +0100
commit6ea386bd98a737a9f54e2ca4216adf45868fd6e4 (patch)
treea4846effd0834fd410a786651b0256e2aecd2b6d /src/util.c
parent08b916e7ab8ea54ee6c38c485f11c9d6da898355 (diff)
Remove global variables JunkRoot, JunkChild
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.c9
1 files changed, 6 insertions, 3 deletions
diff --git a/src/util.c b/src/util.c
index d45a8a2..e634e7f 100644
--- a/src/util.c
+++ b/src/util.c
@@ -209,6 +209,7 @@ Zoom(Window wf, Window wt)
long dx, dy, dw, dh;
long z;
int j;
+ Window wdummy = None;
if (!Scr->DoZoom || Scr->ZoomCount < 1)
return;
@@ -216,8 +217,8 @@ Zoom(Window wf, Window wt)
if (wf == None || wt == None)
return;
- XGetGeometry(dpy, wf, &JunkRoot, &fx, &fy, &fw, &fh, &JunkBW, &JunkDepth);
- XGetGeometry(dpy, wt, &JunkRoot, &tx, &ty, &tw, &th, &JunkBW, &JunkDepth);
+ XGetGeometry(dpy, wf, &wdummy, &fx, &fy, &fw, &fh, &JunkBW, &JunkDepth);
+ XGetGeometry(dpy, wt, &wdummy, &tx, &ty, &tw, &th, &JunkBW, &JunkDepth);
dx = ((long) (tx - fx)); /* going from -> to */
dy = ((long) (ty - fy)); /* going from -> to */
@@ -278,8 +279,10 @@ ExpandFilename(const char *name)
void
GetUnknownIcon(const char *name)
{
+ Window wdummy = None;
+
if ((Scr->UnknownPm = GetBitmap(name)) != None) {
- XGetGeometry(dpy, Scr->UnknownPm, &JunkRoot, &JunkX, &JunkY,
+ XGetGeometry(dpy, Scr->UnknownPm, &wdummy, &JunkX, &JunkY,
(unsigned int *) &Scr->UnknownWidth,
(unsigned int *) &Scr->UnknownHeight, &JunkBW, &JunkDepth);
}