From c5a63751f8b4eab72794e56365ead929023f2b94 Mon Sep 17 00:00:00 2001 From: Tim Wiederhake Date: Sat, 20 Jan 2024 16:07:00 +0100 Subject: Remove global variables JunkX, JunkY Replace with a local variable following the naming scheme from Identify() in src/menus.c. Signed-off-by: Tim Wiederhake --- src/icons.c | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) (limited to 'src/icons.c') diff --git a/src/icons.c b/src/icons.c index 4e406af..5b34245 100644 --- a/src/icons.c +++ b/src/icons.c @@ -320,6 +320,7 @@ CreateIconWindow(TwmWindow *tmp_win, int def_x, int def_y) XSetWindowAttributes attributes; /* attributes for create windows */ Pixmap pm = None; /* tmp pixmap variable */ int final_x, final_y; + int dummy = 0; Window wdummy = None; FB(tmp_win->iconc.fore, tmp_win->iconc.back); @@ -351,7 +352,7 @@ CreateIconWindow(TwmWindow *tmp_win, int def_x, int def_y) } if (bm != None) { - XGetGeometry(dpy, bm, &wdummy, &JunkX, &JunkY, + XGetGeometry(dpy, bm, &wdummy, &dummy, &dummy, (unsigned int *) &tmp_win->icon_width, (unsigned int *) &tmp_win->icon_height, &JunkBW, &JunkDepth); @@ -377,7 +378,7 @@ CreateIconWindow(TwmWindow *tmp_win, int def_x, int def_y) tmp_win->wmhints->flags & IconPixmapHint) { XGetGeometry(dpy, tmp_win->wmhints->icon_pixmap, - &wdummy, &JunkX, &JunkY, + &wdummy, &dummy, &dummy, (unsigned int *) &tmp_win->icon_width, (unsigned int *) &tmp_win->icon_height, &JunkBW, &JunkDepth); @@ -415,7 +416,7 @@ CreateIconWindow(TwmWindow *tmp_win, int def_x, int def_y) } if (bm != None) { - XGetGeometry(dpy, bm, &wdummy, &JunkX, &JunkY, + XGetGeometry(dpy, bm, &wdummy, &dummy, &dummy, (unsigned int *) &tmp_win->icon_width, (unsigned int *) &tmp_win->icon_height, &JunkBW, &JunkDepth); @@ -477,7 +478,7 @@ CreateIconWindow(TwmWindow *tmp_win, int def_x, int def_y) if (tmp_win->wmhints && tmp_win->wmhints->flags & IconWindowHint) { tmp_win->icon_w = tmp_win->wmhints->icon_window; if (tmp_win->forced || - XGetGeometry(dpy, tmp_win->icon_w, &wdummy, &JunkX, &JunkY, + 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) { -- cgit v1.2.3