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/add_window.c | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) (limited to 'src/add_window.c') diff --git a/src/add_window.c b/src/add_window.c index e451bfe..87cb51b 100644 --- a/src/add_window.c +++ b/src/add_window.c @@ -162,6 +162,7 @@ AddWindow(Window w, int iconm, IconMgr *iconp) Bool width_ever_changed_by_user; Bool height_ever_changed_by_user; char *name; + int dummy = 0; Window wdummy = None; #ifdef DEBUG @@ -441,7 +442,7 @@ AddWindow(Window w, int iconm, IconMgr *iconp) XGrabServer(dpy); if (!XQueryPointer(dpy, Scr->Root, &root, - &wdummy, &JunkX, &JunkY, + &wdummy, &dummy, &dummy, &AddingX, &AddingY, &mask)) mask = 0; @@ -569,7 +570,7 @@ AddWindow(Window w, int iconm, IconMgr *iconp) } XQueryPointer(dpy, Scr->Root, &wdummy, &wdummy, - &JunkX, &JunkY, &AddingX, &AddingY, + &dummy, &dummy, &AddingX, &AddingY, &JunkMask); if (Scr->DontMoveOff) { @@ -664,7 +665,7 @@ AddWindow(Window w, int iconm, IconMgr *iconp) * grab the server. */ XQueryPointer(dpy, Scr->Root, &wdummy, &wdummy, - &JunkX, &JunkY, &AddingX, &AddingY, + &dummy, &dummy, &AddingX, &AddingY, &JunkMask); if (lastx != AddingX || lasty != AddingY) { @@ -766,7 +767,7 @@ AddWindow(Window w, int iconm, IconMgr *iconp) * reparented, so we'll get a DestroyNotify for it. We won't have * gotten one for anything up to here, however. */ - if (XGetGeometry(dpy, tmp_win->w, &wdummy, &JunkX, &JunkY, + if (XGetGeometry(dpy, tmp_win->w, &wdummy, &dummy, &dummy, &JunkWidth, &JunkHeight, &JunkBW, &JunkDepth) == 0) { free(tmp_win); XUngrabServer(dpy); -- cgit v1.2.3