MacUtil.getVisibleRegion(data.controlHandle, result, true); OS.OffsetRgn(result, (short)-dx, (short)-dy);
	private boolean focus(boolean doClip, Rect bounds) {				if (fIsFocused && !fPendingClip) {			return true;		}		// save global state		OS.GetGWorld(fSavePort, fSaveGWorld);				OS.SetGWorld(handle, fSaveGWorld[0]);				if (!doClip)			return true;				int dx= 0, dy= 0;		// set origin of port using drawable bounds		if (data.controlHandle != 0) {			MacUtil.getControlBounds(data.controlHandle, fRect);			dx= fRect.left;			dy= fRect.top;			OS.SetOrigin((short)-dx, (short)-dy);			org.eclipse.swt.internal.carbon.Point p= new org.eclipse.swt.internal.carbon.Point();			OS.SetPt(p, (short)-dx, (short)-dy);			OS.QDSetPatternOrigin(p);		}		// save clip region		OS.GetClip(fSaveClip);				// calculate new clip based on the controls bound and GC clipping region		if (data.controlHandle != 0) {									int result= OS.NewRgn();			MacUtil.getVisibleRegion(data.controlHandle, result, true);			OS.OffsetRgn(result, (short)-dx, (short)-dy);						// clip against damage 			if (fDamageRgn != 0) {				int dRgn= OS.NewRgn();				OS.CopyRgn(fDamageRgn, dRgn);				OS.SectRgn(result, dRgn, result);			}						// clip against GC clipping region			if (data.clipRgn != 0) {				OS.SectRgn(result, data.clipRgn, result);			}							OS.SetClip(result);			if (bounds != null)				OS.GetRegionBounds(result, bounds);			OS.DisposeRgn(result);					} else {			// clip against GC clipping region			if (data.clipRgn != 0) {				OS.SetClip(data.clipRgn);				if (bounds != null)					OS.GetRegionBounds(data.clipRgn, bounds);			} else {				if (bounds != null)					OS.SetRect(bounds, (short)0, (short)0, (short)0x7fff, (short)0x7fff);			}		}		fPendingClip= false;				return true;	}