event.item = items [index];
event.item = _getItem (lastHittest, true);
int kEventMouseDown (int nextHandler, int theEvent, int userData) {	int [] outData = new int [1];	OS.GetEventParameter (theEvent, OS.kEventParamClickCount, OS.typeUInt32, null, 4, null, outData);	clickCount = outData [0];	int result = super.kEventMouseDown (nextHandler, theEvent, userData);	if (result == OS.noErr) return result;	Shell shell = getShell ();	shell.bringToTop (true);	/*	* Feature in the Macintosh.  For some reason, when the user	* clicks on the data browser, focus is assigned, then lost	* and then reassigned causing kEvenControlSetFocusPart events.	* The fix is to ignore kEvenControlSetFocusPart when the user	* clicks and send the focus events from kEventMouseDown.	*/	Control oldFocus = display.getFocusControl ();	display.ignoreFocus = true;	wasSelected = wasExpanded = false;	result = OS.CallNextEventHandler (nextHandler, theEvent);	display.ignoreFocus = false;	if (oldFocus != this) {		if (oldFocus != null && !oldFocus.isDisposed ()) oldFocus.sendFocusEvent (SWT.FocusOut, false);		if (!isDisposed () && isEnabled ()) sendFocusEvent (SWT.FocusIn, false);	}	if (!wasSelected && !wasExpanded) {		if (OS.IsDataBrowserItemSelected (handle, lastHittest)) {			int index = lastHittest - 1;			if (0 <= index && index < items.length) {				Event event = new Event ();				event.item = items [index];				postEvent (SWT.Selection, event);			}		}	}	/*	* Feature in the Macintosh.  Some controls call TrackControl() or	* HandleControlClick() to track the mouse.  Unfortunately, mouse move	* events and the mouse up events are consumed.  The fix is to call the	* default handler and send a fake mouse up when tracking is finished.	* 	* NOTE: No mouse move events are sent while tracking.  There is no	* fix for this at this time.	*/	if (wasExpanded) {		org.eclipse.swt.internal.carbon.Point outPt = new org.eclipse.swt.internal.carbon.Point ();		OS.GetGlobalMouse (outPt);		Rect rect = new Rect ();		int window = OS.GetControlOwner (handle);		int x, y;		if (OS.HIVIEW) {			CGPoint pt = new CGPoint ();			pt.x = outPt.h;			pt.y = outPt.v;			OS.HIViewConvertPoint (pt, 0, handle);			x = (int) pt.x;			y = (int) pt.y;			OS.GetWindowBounds (window, (short) OS.kWindowStructureRgn, rect);		} else {			OS.GetControlBounds (handle, rect);			x = outPt.h - rect.left;			y = outPt.v - rect.top;			OS.GetWindowBounds (window, (short) OS.kWindowContentRgn, rect);		}		x -= rect.left;		y -=  rect.top;		short [] button = new short [1];		OS.GetEventParameter (theEvent, OS.kEventParamMouseButton, OS.typeMouseButton, null, 2, null, button);		int chord = OS.GetCurrentEventButtonState ();		int modifiers = OS.GetCurrentEventKeyModifiers ();		sendMouseEvent (SWT.MouseUp, button [0], chord, (short)x, (short)y, modifiers, false);	}	wasSelected = wasExpanded = false;	return result;}