try { notifyListeners(DND.DragLeave, event); } catch (Throwable e) {}
notifyListeners(DND.DragLeave, event);
private void dragProcCallback(int widget, int client_data, int call_data) {	if (call_data == 0) return;	XmDragProcCallbackStruct callbackData = new XmDragProcCallbackStruct();	OS.memmove(callbackData, call_data, XmDragProcCallbackStruct.sizeof);		if (callbackData.reason == OS.XmCR_DROP_SITE_LEAVE_MESSAGE) {		updateDragOverHover(0, null);		effect.show(DND.FEEDBACK_NONE, 0, 0);				if (callbackData.dropSiteStatus == OS.XmDROP_SITE_INVALID) {			return;		}		DNDEvent event = new DNDEvent();		event.widget = this;		event.time = callbackData.timeStamp;		event.detail = DND.DROP_NONE;		try {			notifyListeners(DND.DragLeave, event);		} catch (Throwable e) {}		return;	}		if (callbackData.reason == OS.XmCR_DROP_SITE_ENTER_MESSAGE) {		selectedDataType = null;		selectedOperation = DND.DROP_NONE;		droppedEventData = null;		dropTransferObject = 0;	}		DNDEvent event = new DNDEvent();	if (!setEventData(callbackData.operations, callbackData.operation, callbackData.dragContext, callbackData.x, callbackData.y, callbackData.timeStamp, event)) {		callbackData.dropSiteStatus = (byte)OS.XmDROP_SITE_INVALID;		callbackData.operation = opToOsOp(DND.DROP_NONE);		OS.memmove(call_data, callbackData, XmDragProcCallbackStruct.sizeof);		return;	}		int allowedOperations = event.operations;	TransferData[] allowedDataTypes = new TransferData[event.dataTypes.length];	System.arraycopy(event.dataTypes, 0, allowedDataTypes, 0, allowedDataTypes.length);		switch (callbackData.reason) {		case OS.XmCR_DROP_SITE_ENTER_MESSAGE :			event.type = DND.DragEnter;			break;		case OS.XmCR_DROP_SITE_MOTION_MESSAGE :			event.type = DND.DragOver;			event.dataType = selectedDataType;			event.detail = selectedOperation;			break;		case OS.XmCR_OPERATION_CHANGED :			event.type = DND.DragOperationChanged;			event.dataType = selectedDataType;			break;	}		updateDragOverHover(DRAGOVER_HYSTERESIS, event);		try {		notifyListeners(event.type, event);	} catch (Throwable err) {		callbackData.dropSiteStatus = (byte)OS.XmDROP_SITE_INVALID;		callbackData.operation = opToOsOp(DND.DROP_NONE);		OS.memmove(call_data, callbackData, XmDragProcCallbackStruct.sizeof);		return;	}	if (event.detail == DND.DROP_DEFAULT) {		event.detail = (allowedOperations & DND.DROP_MOVE) != 0 ? DND.DROP_MOVE : DND.DROP_NONE;	}		selectedDataType = null;	if (event.dataType != null) {		for (int i = 0; i < allowedDataTypes.length; i++) {			if (allowedDataTypes[i].type == event.dataType.type) {				selectedDataType = allowedDataTypes[i];				break;			}		}	}	selectedOperation = DND.DROP_NONE;	if (selectedDataType != null && (allowedOperations & event.detail) != 0) {		selectedOperation = event.detail;	}		effect.show(event.feedback, event.x, event.y);	callbackData.dropSiteStatus = (byte)OS.XmDROP_SITE_VALID;	callbackData.operation = opToOsOp(selectedOperation);	OS.memmove(call_data, callbackData, XmDragProcCallbackStruct.sizeof);		if (callbackData.reason == OS.XmCR_DROP_SITE_ENTER_MESSAGE) {		dragOverHeartbeat.run();	}}