From 6ea386bd98a737a9f54e2ca4216adf45868fd6e4 Mon Sep 17 00:00:00 2001 From: Tim Wiederhake Date: Sat, 20 Jan 2024 16:07:00 +0100 Subject: 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 --- src/cursor.c | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) (limited to 'src/cursor.c') diff --git a/src/cursor.c b/src/cursor.c index 84d3f0c..9cc26c7 100644 --- a/src/cursor.c +++ b/src/cursor.c @@ -149,6 +149,7 @@ NewBitmapCursor(Cursor *cp, char *source, char *mask) int sx, sy, mx, my; unsigned int sw, sh, mw, mh; Pixmap spm, mpm; + Window wdummy = None; spm = GetBitmap(source); if ((hotx = HotX) < 0) @@ -159,8 +160,8 @@ NewBitmapCursor(Cursor *cp, char *source, char *mask) /* make sure they are the same size */ - XGetGeometry(dpy, spm, &JunkRoot, &sx, &sy, &sw, &sh, &JunkBW, &JunkDepth); - XGetGeometry(dpy, mpm, &JunkRoot, &mx, &my, &mw, &mh, &JunkBW, &JunkDepth); + XGetGeometry(dpy, spm, &wdummy, &sx, &sy, &sw, &sh, &JunkBW, &JunkDepth); + XGetGeometry(dpy, mpm, &wdummy, &mx, &my, &mw, &mh, &JunkBW, &JunkDepth); if (sw != mw || sh != mh) { twmWarning("cursor bitmaps \"%s\" and \"%s\" not the same size\n", source, mask); -- cgit v1.2.3 From 783b31821d87ea551457f4700f796a51f359cfd1 Mon Sep 17 00:00:00 2001 From: Tim Wiederhake Date: Sat, 20 Jan 2024 16:07:00 +0100 Subject: 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 --- src/cursor.c | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) (limited to 'src/cursor.c') diff --git a/src/cursor.c b/src/cursor.c index 9cc26c7..297fc08 100644 --- a/src/cursor.c +++ b/src/cursor.c @@ -149,6 +149,7 @@ NewBitmapCursor(Cursor *cp, char *source, char *mask) int sx, sy, mx, my; unsigned int sw, sh, mw, mh; Pixmap spm, mpm; + unsigned udummy = 0; Window wdummy = None; spm = GetBitmap(source); @@ -160,8 +161,8 @@ NewBitmapCursor(Cursor *cp, char *source, char *mask) /* make sure they are the same size */ - XGetGeometry(dpy, spm, &wdummy, &sx, &sy, &sw, &sh, &JunkBW, &JunkDepth); - XGetGeometry(dpy, mpm, &wdummy, &mx, &my, &mw, &mh, &JunkBW, &JunkDepth); + XGetGeometry(dpy, spm, &wdummy, &sx, &sy, &sw, &sh, &udummy, &udummy); + XGetGeometry(dpy, mpm, &wdummy, &mx, &my, &mw, &mh, &udummy, &udummy); if (sw != mw || sh != mh) { twmWarning("cursor bitmaps \"%s\" and \"%s\" not the same size\n", source, mask); -- cgit v1.2.3