Rectangle bounds = getBounds(); if (bounds.contains(event.x, event.y)) return;
if (inactiveItem != null) { Rectangle itemBounds = inactiveItem.getBounds(); if (itemBounds.contains(event.x, event.y)) return; }
private void handleEvents (Event event){	switch (event.type) {		case SWT.Dispose:			onDispose();			break;		case SWT.Paint:			onPaint(event);			break;		case SWT.Resize:			onResize();			break;		case SWT.MouseUp:			onMouseUp(event);			break;		case SWT.MouseExit:			if (event.widget == this) {				Rectangle inactiveBounds = inactiveCloseBar.getBounds();				if (inactiveBounds.contains(event.x, event.y)) return;				inactiveCloseBar.setVisible(false);				inactiveItem = null;			}			if (event.widget == inactiveCloseBar) {				Rectangle bounds = getBounds();				if (bounds.contains(event.x, event.y)) return;				inactiveCloseBar.setVisible(false);				inactiveItem = null;			}			break;		case SWT.MouseMove:			onMouseMove(event);			break;		case SWT.Selection:			if (event.widget == scrollLeft) {				scroll_scrollLeft();			}			if (event.widget == scrollRight) {				scroll_scrollRight();			}			if (event.widget == closeItem) {				closeNotify(getSelection(), event.time);			}			if (event.widget == inactiveCloseItem) {				closeNotify(inactiveItem, event.time);				inactiveCloseBar.setVisible(false);				inactiveItem = null;			}			break;		default:			break;	}}