Index: XGContextEvent.m
===================================================================
RCS file: /cvsroot/gnustep/gnustep/core/xgps/Source/SharedX/XGContextEvent.m,v
retrieving revision 1.98
diff -u -r1.98 XGContextEvent.m
--- XGContextEvent.m	14 Mar 2002 21:02:52 -0000	1.98
+++ XGContextEvent.m	19 Mar 2002 16:12:35 -0000
@@ -751,8 +751,28 @@
 		    r = cWin->xframe;
 		    if (xEvent.xconfigure.send_event == 0)
 		      {
-			x = NSMakeRect(r.origin.x, r.origin.y,
-			  xEvent.xconfigure.width, xEvent.xconfigure.height);
+			if (cWin->parent == None)
+			  {
+			    x = NSMakeRect(r.origin.x, r.origin.y,
+					   xEvent.xconfigure.width, xEvent.xconfigure.height);
+			  }
+			else
+			  {
+			    XWindowAttributes wattr;
+			    int par_x, par_y;
+			    XGetWindowAttributes(XDPY, 
+						 cWin->parent, 
+						 &wattr);
+			    par_x = wattr.x;
+			    par_y = wattr.y;
+			    XGetWindowAttributes(XDPY, 
+						 xEvent.xconfigure.event, 
+						 &wattr);
+			    par_x += wattr.x;
+			    par_y += wattr.y;
+			    x = NSMakeRect(par_x, par_y,
+					   xEvent.xconfigure.width, xEvent.xconfigure.height);
+			  }
 		      }
 		    else
 		      {
