summaryrefslogtreecommitdiff
path: root/src/menus.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/menus.c')
-rw-r--r--src/menus.c30
1 files changed, 17 insertions, 13 deletions
diff --git a/src/menus.c b/src/menus.c
index aa23a16..4ab2a30 100644
--- a/src/menus.c
+++ b/src/menus.c
@@ -469,6 +469,7 @@ UpdateMenu(void)
int done;
MenuItem *badItem = NULL;
XPointer context_data;
+ Window wdummy = None;
fromMenu = TRUE;
@@ -506,7 +507,7 @@ UpdateMenu(void)
continue;
done = FALSE;
- XQueryPointer(dpy, ActiveMenu->w, &JunkRoot, &JunkChild,
+ XQueryPointer(dpy, ActiveMenu->w, &wdummy, &wdummy,
&x_root, &y_root, &x, &y, &JunkMask);
/* if we haven't received the enter notify yet, wait */
@@ -1119,16 +1120,17 @@ resizeFromCenter(Window w, TwmWindow *tmp_win)
{
int lastx, lasty, bw2;
XEvent event;
+ Window wdummy = None;
bw2 = tmp_win->frame_bw * 2;
AddingW = tmp_win->attr.width + bw2;
AddingH = tmp_win->attr.height + tmp_win->title_height + bw2;
- XGetGeometry(dpy, w, &JunkRoot, &origDragX, &origDragY,
+ XGetGeometry(dpy, w, &wdummy, &origDragX, &origDragY,
(unsigned int *) &DragWidth, (unsigned int *) &DragHeight,
&JunkBW, &JunkDepth);
XWarpPointer(dpy, None, w, 0, 0, 0, 0, DragWidth / 2, DragHeight / 2);
- XQueryPointer(dpy, Scr->Root, &JunkRoot,
- &JunkChild, &JunkX, &JunkY, &AddingX, &AddingY, &JunkMask);
+ XQueryPointer(dpy, Scr->Root, &wdummy,
+ &wdummy, &JunkX, &JunkY, &AddingX, &AddingY, &JunkMask);
lastx = -10000;
lasty = -10000;
MenuStartResize(tmp_win, origDragX, origDragY, DragWidth, DragHeight);
@@ -1161,7 +1163,7 @@ resizeFromCenter(Window w, TwmWindow *tmp_win)
* 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);
if (lastx != AddingX || lasty != AddingY) {
@@ -1218,6 +1220,7 @@ ExecuteFunction(int func, const char *action, Window w, TwmWindow *tmp_win,
int moving_icon = FALSE;
Bool fromtitlebar = False;
unsigned bw = 0;
+ Window wdummy = None;
RootFunction = 0;
if (Cancel)
@@ -1471,14 +1474,14 @@ ExecuteFunction(int func, const char *action, Window w, TwmWindow *tmp_win,
XTranslateCoordinates(dpy, w, tmp_win->frame,
eventp->xbutton.x,
eventp->xbutton.y,
- &DragX, &DragY, &JunkChild);
+ &DragX, &DragY, &wdummy);
w = tmp_win->frame;
}
DragWindow = None;
- XGetGeometry(dpy, w, &JunkRoot, &origDragX, &origDragY,
+ XGetGeometry(dpy, w, &wdummy, &origDragX, &origDragY,
(unsigned int *) &DragWidth, (unsigned int *) &DragHeight,
&bw, &JunkDepth);
@@ -1513,7 +1516,7 @@ ExecuteFunction(int func, const char *action, Window w, TwmWindow *tmp_win,
XWarpPointer(dpy, None, w,
0, 0, 0, 0, DragWidth / 2, DragHeight / 2);
- XQueryPointer(dpy, w, &JunkRoot, &JunkChild,
+ XQueryPointer(dpy, w, &wdummy, &wdummy,
&JunkX, &JunkY, &DragX, &DragY, &JunkMask);
}
last_time = eventp->xbutton.time;
@@ -1599,7 +1602,7 @@ ExecuteFunction(int func, const char *action, Window w, TwmWindow *tmp_win,
CurrentDragY = origY = Event.xbutton.y_root;
XTranslateCoordinates(dpy, rootw, tmp_win->frame,
- origX, origY, &DragX, &DragY, &JunkChild);
+ origX, origY, &DragX, &DragY, &wdummy);
continue;
}
@@ -1628,7 +1631,7 @@ ExecuteFunction(int func, const char *action, Window w, TwmWindow *tmp_win,
if (Event.type != MotionNotify)
continue;
- XQueryPointer(dpy, rootw, &(eventp->xmotion.root), &JunkChild,
+ XQueryPointer(dpy, rootw, &(eventp->xmotion.root), &wdummy,
&(eventp->xmotion.x_root), &(eventp->xmotion.y_root),
&JunkX, &JunkY, &JunkMask);
@@ -1654,7 +1657,7 @@ ExecuteFunction(int func, const char *action, Window w, TwmWindow *tmp_win,
eventp->xmotion.y_root > ConstMoveYB)
ConstMoveDir = MOVE_VERT;
- XQueryPointer(dpy, DragWindow, &JunkRoot, &JunkChild,
+ XQueryPointer(dpy, DragWindow, &wdummy, &wdummy,
&JunkX, &JunkY, &DragX, &DragY, &JunkMask);
break;
@@ -2520,13 +2523,14 @@ Identify(TwmWindow *t)
Window junk;
int px, py, dummy;
unsigned udummy;
+ Window wdummy = None;
n = 0;
snprintf(Info[n++], INFO_SIZE, "Twm version: %s", Version);
Info[n++][0] = '\0';
if (t) {
- XGetGeometry(dpy, t->w, &JunkRoot, &JunkX, &JunkY,
+ XGetGeometry(dpy, t->w, &wdummy, &JunkX, &JunkY,
&wwidth, &wheight, &bw, &depth);
(void) XTranslateCoordinates(dpy, t->w, Scr->Root, 0, 0, &x, &y, &junk);
snprintf(Info[n++], INFO_SIZE,
@@ -2565,7 +2569,7 @@ Identify(TwmWindow *t)
XUnmapWindow(dpy, Scr->InfoWindow);
width += 10; /* some padding */
- if (XQueryPointer(dpy, Scr->Root, &JunkRoot, &JunkChild, &px, &py,
+ if (XQueryPointer(dpy, Scr->Root, &wdummy, &wdummy, &px, &py,
&dummy, &dummy, &udummy)) {
px -= (width / 2);
py -= (height / 3);