summaryrefslogtreecommitdiff
path: root/src/icons.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
commit783b31821d87ea551457f4700f796a51f359cfd1 (patch)
tree00ee2750f4ce1348b8661ffea760eca335648a66 /src/icons.c
parentc5a63751f8b4eab72794e56365ead929023f2b94 (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/icons.c')
-rw-r--r--src/icons.c20
1 files changed, 11 insertions, 9 deletions
diff --git a/src/icons.c b/src/icons.c
index 5b34245..39a2097 100644
--- a/src/icons.c
+++ b/src/icons.c
@@ -163,6 +163,7 @@ IconUp(TwmWindow *tmp_win)
int x, y;
int defx, defy;
struct IconRegion *ir;
+ unsigned udummy = 0;
Window wdummy = None;
/*
@@ -178,7 +179,7 @@ IconUp(TwmWindow *tmp_win)
unsigned height = 0;
if (!XGetGeometry(dpy, tmp_win->icon_w, &wdummy, &defx, &defy,
- &width, &height, &JunkBW, &JunkDepth))
+ &width, &height, &udummy, &udummy))
return;
x = defx + ((int) width) / 2;
@@ -321,6 +322,7 @@ CreateIconWindow(TwmWindow *tmp_win, int def_x, int def_y)
Pixmap pm = None; /* tmp pixmap variable */
int final_x, final_y;
int dummy = 0;
+ unsigned udummy = 0;
Window wdummy = None;
FB(tmp_win->iconc.fore, tmp_win->iconc.back);
@@ -354,8 +356,8 @@ CreateIconWindow(TwmWindow *tmp_win, int def_x, int def_y)
if (bm != None) {
XGetGeometry(dpy, bm, &wdummy, &dummy, &dummy,
(unsigned int *) &tmp_win->icon_width,
- (unsigned int *) &tmp_win->icon_height, &JunkBW,
- &JunkDepth);
+ (unsigned int *) &tmp_win->icon_height, &udummy,
+ &udummy);
pm = XCreatePixmap(dpy, Scr->Root, (unsigned) tmp_win->icon_width,
(unsigned) tmp_win->icon_height,
@@ -380,8 +382,8 @@ CreateIconWindow(TwmWindow *tmp_win, int def_x, int def_y)
XGetGeometry(dpy, tmp_win->wmhints->icon_pixmap,
&wdummy, &dummy, &dummy,
(unsigned int *) &tmp_win->icon_width,
- (unsigned int *) &tmp_win->icon_height, &JunkBW,
- &JunkDepth);
+ (unsigned int *) &tmp_win->icon_height, &udummy,
+ &udummy);
pm = XCreatePixmap(dpy, Scr->Root,
(unsigned) tmp_win->icon_width,
@@ -418,8 +420,8 @@ CreateIconWindow(TwmWindow *tmp_win, int def_x, int def_y)
if (bm != None) {
XGetGeometry(dpy, bm, &wdummy, &dummy, &dummy,
(unsigned int *) &tmp_win->icon_width,
- (unsigned int *) &tmp_win->icon_height, &JunkBW,
- &JunkDepth);
+ (unsigned int *) &tmp_win->icon_height, &udummy,
+ &udummy);
pm = XCreatePixmap(dpy, Scr->Root, (unsigned) tmp_win->icon_width,
(unsigned) tmp_win->icon_height,
@@ -480,8 +482,8 @@ CreateIconWindow(TwmWindow *tmp_win, int def_x, int def_y)
if (tmp_win->forced ||
XGetGeometry(dpy, tmp_win->icon_w, &wdummy, &dummy, &dummy,
(unsigned int *) &tmp_win->icon_w_width,
- (unsigned int *) &tmp_win->icon_w_height, &JunkBW,
- &JunkDepth) == 0) {
+ (unsigned int *) &tmp_win->icon_w_height, &udummy,
+ &udummy) == 0) {
tmp_win->icon_w = None;
tmp_win->wmhints->flags &= ~IconWindowHint;
}