diff options
author | Tim Wiederhake <twied@gmx.net> | 2024-01-20 16:07:00 +0100 |
---|---|---|
committer | Tim Wiederhake <twied@gmx.net> | 2024-01-20 16:07:00 +0100 |
commit | 6ea386bd98a737a9f54e2ca4216adf45868fd6e4 (patch) | |
tree | a4846effd0834fd410a786651b0256e2aecd2b6d /src/add_window.c | |
parent | 08b916e7ab8ea54ee6c38c485f11c9d6da898355 (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/add_window.c')
-rw-r--r-- | src/add_window.c | 9 |
1 files changed, 5 insertions, 4 deletions
diff --git a/src/add_window.c b/src/add_window.c index 1f5abe1..e451bfe 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; + Window wdummy = None; #ifdef DEBUG fprintf(stderr, "AddWindow: w = 0x%lx\n", (unsigned long) w); @@ -440,7 +441,7 @@ AddWindow(Window w, int iconm, IconMgr *iconp) XGrabServer(dpy); if (!XQueryPointer(dpy, Scr->Root, &root, - &JunkChild, &JunkX, &JunkY, + &wdummy, &JunkX, &JunkY, &AddingX, &AddingY, &mask)) mask = 0; @@ -567,7 +568,7 @@ AddWindow(Window w, int iconm, IconMgr *iconp) continue; } - XQueryPointer(dpy, Scr->Root, &JunkRoot, &JunkChild, + XQueryPointer(dpy, Scr->Root, &wdummy, &wdummy, &JunkX, &JunkY, &AddingX, &AddingY, &JunkMask); @@ -662,7 +663,7 @@ AddWindow(Window w, int iconm, IconMgr *iconp) * using multiple GXxor lines so that we don't need to * grab the server. */ - XQueryPointer(dpy, Scr->Root, &JunkRoot, &JunkChild, + XQueryPointer(dpy, Scr->Root, &wdummy, &wdummy, &JunkX, &JunkY, &AddingX, &AddingY, &JunkMask); @@ -765,7 +766,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, &JunkRoot, &JunkX, &JunkY, + if (XGetGeometry(dpy, tmp_win->w, &wdummy, &JunkX, &JunkY, &JunkWidth, &JunkHeight, &JunkBW, &JunkDepth) == 0) { free(tmp_win); XUngrabServer(dpy); |