Path: utzoo!attcan!uunet!cs.utexas.edu!tut.cis.ohio-state.edu!rutgers!aramis.rutgers.edu!qbranch.rutgers.edu!rapatel From: rapatel@qbranch.rutgers.edu (Rocky) Newsgroups: comp.windows.x Subject: Re: xplaces vs. twm, et al Message-ID: Date: 27 Aug 89 01:03:47 GMT References: <169@uucs1.UUCP> Organization: Rutgers Univ., New Brunswick, N.J. Lines: 88 This patch is for the xplaces by Michael Rowen that got posted in comp.sources.x, not the one that came with R3. It works for us. That version of xplaces is much nicer than the original one in R3. What follows is the context diff for that version of xplaces. Rakesh Patel. *** xplaces.c.ORIG Sat Dec 17 20:31:49 1988 --- xplaces.c Sun Aug 13 21:14:42 1989 *************** *** 44,49 **** --- 44,50 ---- char *except[MAXEXCEPT], *dasheme; + Window Root; int main(argc, argv) *************** *** 54,60 **** char *pchDisplayName = NULL, *pchFile = NULL, *progname; - Window Root; int screen, i; --- 55,60 ---- *************** *** 149,154 **** --- 149,155 ---- { Window *children, misc, + junk, parent; int iChildren; char *pchWin, *************** *** 155,161 **** *pchName; int iCnt, x, ! y, xterm = 0, done = 0, didrsh = 0; --- 156,164 ---- *pchName; int iCnt, x, ! y, ! realx, ! realy, xterm = 0, done = 0, didrsh = 0; *************** *** 190,195 **** --- 193,200 ---- XGetWindowAttributes(dpy, *children, &info); XGetGeometry(dpy, *children, &misc, &x, &y, &w, &h, &b, &d); + XTranslateCoordinates(dpy, *children, Root, x, y, + &realx, &realy,&junk); /* * Is geometry in pixels or chars? */ *************** *** 230,236 **** fprintf(pFout, "%s ", pchWin); } fprintf(pFout,"-geometry %dx%d+%d+%d", ! winwidth,winheight,hints.x, hints.y); if(borderwidth) { fprintf(pFout," -borderwidth %d ",b); } --- 235,241 ---- fprintf(pFout, "%s ", pchWin); } fprintf(pFout,"-geometry %dx%d+%d+%d", ! winwidth,winheight, realx, realy); if(borderwidth) { fprintf(pFout," -borderwidth %d ",b); }