operation = osOpToOp(gdkDragContext.action); if (moveData) operation = DND.DROP_MOVE;
if (moveData) { operation = DND.DROP_MOVE; } else { operation = osOpToOp(gdkDragContext.action); if (operation == DND.DROP_MOVE) operation = DND.DROP_NONE; }
void dragEnd(int /*long*/ widget, int /*long*/ context){	/*	 * Bug in GTK.  If a drag is initiated using gtk_drag_begin and the 	 * mouse is released immediately, the mouse and keyboard remain	 * grabbed.  The fix is to release the grab on the mouse and keyboard	 * whenever the drag is terminated.	 * 	 * NOTE: We believe that it is never an error to ungrab when	 * a drag is finished.	 */	OS.gdk_pointer_ungrab(OS.GDK_CURRENT_TIME); 	OS.gdk_keyboard_ungrab(OS.GDK_CURRENT_TIME);		int operation = DND.DROP_NONE;	if (context != 0) {		GdkDragContext gdkDragContext = new GdkDragContext ();		OS.memmove(gdkDragContext, context, GdkDragContext.sizeof);		if (gdkDragContext.dest_window != 0) { //NOTE: if dest_window is 0, drag was aborted			operation = osOpToOp(gdkDragContext.action);			if (moveData) operation = DND.DROP_MOVE;		}	}			DNDEvent event = new DNDEvent();	event.widget = this;	//event.time = ???	event.doit = operation != 0;	event.detail = operation; 		try {		notifyListeners(DND.DragEnd, event);	} catch (Throwable e) {}	moveData = false;	}	