Path: utzoo!utgpu!water!watmath!clyde!att!rutgers!mailrus!ncar!boulder!stan!garya From: garya@stan.com (Gary Aitken) Newsgroups: comp.windows.x Subject: MoveWindow bug Keywords: bug Message-ID: <230@stan.com> Date: 6 Sep 88 22:43:10 GMT Organization: Solbourne Computer Inc., Longmont, Co. Lines: 55 The following program displays two windows, one parented inside the other. On our version of X (X11R2), the XMoveWindow causes the interior window to be painted with a 2 pixel wide border along the upper and left edges. Pushing and popping the window using uwm causes it to refresh correctly, with only a 1 pixel border. Try it with no arguments and one argument, with and without a wm running. Strangely enough, we see the following behavior: No args 1 arg No wm Fails Fails Modified uwm Fails Works Has this been fixed? Does this fail on anyone else's systems? Cut here ------------------------------------------------------------------------- # include main (argc,argv) int argc ; char **argv ; { static char dspnam[] = "unix:0.0" ; Display *dspp ; Window win,w2 ; Window root ; char str[10] ; XEvent event ; if (dspp = XOpenDisplay(dspnam)) { XSynchronize(dspp,1) ; root = XDefaultRootWindow(dspp) ; w2 = XCreateSimpleWindow(dspp,root,0,0,400,300,1,1,0) ; win = XCreateSimpleWindow(dspp,root,0,0,500,400,1,1,0) ; if (argc == 1) XSelectInput(dspp,win,VisibilityChangeMask) ; XMapRaised(dspp,win) ; if (argc == 1) { XWindowEvent(dspp,win,VisibilityChangeMask,&event) ; XSelectInput(dspp,win,NoEventMask) ; } else XFlush(dspp) ; XReparentWindow(dspp,w2,win,50,50) ; XMapWindow(dspp,w2) ; gets(str) ; XMoveWindow(dspp,win,100,100) ; gets(str) ; XCloseDisplay(dspp) ; } }