OS.XtTranslateCoords (scrolledHandle, (short) 0, (short) 0, inner_x, inner_y);
OS.XtTranslateCoords (shellHandle, (short) 0, (short) 0, inner_x, inner_y);
void adjustTrim () {	if (OS.XtIsSubclass (shellHandle, OS.OverrideShellWidgetClass ())) {		return;	}	int [] argList = {OS.XmNoverrideRedirect, 0};	OS.XtGetValues (shellHandle, argList, argList.length / 2);	if (argList [1] != 0) return;		/* Query the trim insets */	int shellWindow = OS.XtWindow (shellHandle);	if (shellWindow == 0) return;	int xDisplay = OS.XtDisplay (shellHandle);	if (xDisplay == 0) return;		/* Find the direct child of the root window */	int [] unused = new int [1];	int [] rootWindow = new int [1];	int [] parent = new int [1];	int [] ptr = new int [1];	int trimWindow = shellWindow;	OS.XQueryTree (xDisplay, trimWindow, rootWindow, parent, ptr, unused);	if (ptr [0] != 0) OS.XFree (ptr [0]);	if (parent [0] == 0) return;	while (parent [0] != rootWindow [0]) {		trimWindow = parent [0];		OS.XQueryTree (xDisplay, trimWindow, unused, parent, ptr, unused);		if (ptr [0] != 0) OS.XFree (ptr [0]);		if (parent [0] == 0) return;		}		/*	 * Translate the coordinates of the shell window to the	 * coordinates of the direct child of the root window	 */	if (shellWindow == trimWindow) return;	/* Query the border width of the direct child of the root window */	int [] trimBorder = new int [1];	int [] trimWidth = new int [1];	int [] trimHeight = new int [1];	int [] trimX = new int [1];	int [] trimY = new int [1];	OS.XGetGeometry (xDisplay, trimWindow, unused, trimX, trimY, trimWidth, trimHeight, trimBorder, unused);	/* Query the border width of the direct child of the shell window */	int [] shellBorder = new int [1];	int [] shellWidth = new int [1];	int [] shellHeight = new int [1];	OS.XGetGeometry (xDisplay, shellWindow, unused, unused, unused, shellWidth, shellHeight, shellBorder, unused);		/* Query the trim-adjusted position of the inner window */	short [] inner_x = new short [1], inner_y = new short [1];	OS.XtTranslateCoords (scrolledHandle, (short) 0, (short) 0, inner_x, inner_y);	/* Calculate the trim */	int width = (trimWidth [0] + (trimBorder [0] * 2)) - (shellWidth [0] + (shellBorder [0] * 2));	int height = (trimHeight [0] + (trimBorder [0] * 2)) - (shellHeight [0] + (shellBorder [0] * 2));	int leftInset = inner_x [0] - trimX [0];	int topInset = inner_y [0] - trimY [0];		/* Update the trim guesses to match the query */	boolean hasTitle = false, hasResize = false, hasBorder = false;	if ((style & SWT.NO_TRIM) == 0) {		hasTitle = (style & (SWT.MIN | SWT.MAX | SWT.TITLE | SWT.MENU)) != 0;		hasResize = (style & SWT.RESIZE) != 0;		hasBorder = (style & SWT.BORDER) != 0;	}	if (hasTitle) {		if (hasResize)  {			display.leftTitleResizeWidth = leftInset;			display.rightTitleResizeWidth = width - leftInset;			display.topTitleResizeHeight = topInset;			display.bottomTitleResizeHeight = height - topInset;			return;		}		if (hasBorder) {			display.leftTitleBorderWidth = leftInset;			display.rightTitleBorderWidth = width - leftInset;			display.topTitleBorderHeight = topInset;			display.bottomTitleBorderHeight = height - topInset;			return;		}		display.leftTitleWidth = leftInset;		display.rightTitleWidth = width - leftInset;		display.topTitleHeight = topInset;		display.bottomTitleHeight = height - topInset;		return;	}	if (hasResize) {		display.leftResizeWidth = leftInset;		display.rightResizeWidth = width - leftInset;		display.topResizeHeight = topInset;		display.bottomResizeHeight = height - topInset;		return;	}	if (hasBorder) {		display.leftBorderWidth = leftInset;		display.rightBorderWidth = width - leftInset;		display.topBorderHeight = topInset;		display.bottomBorderHeight = height - topInset;		return;	}}