if (elem != math_view->element) { mDOMNodeRef node = (elem != NULL) ? elem->GetDOMNode() : NULL; math_view->element = elem;
mDOMNodeRef node = findDOMNode(elem);  if (node != math_view->node) { math_view->node = node;
gtk_math_view_motion_notify_event(GtkWidget* widget,				  GdkEventMotion* event,				  GtkMathView* math_view){  g_return_val_if_fail(event != NULL, FALSE);  g_return_val_if_fail(math_view != NULL, FALSE);  g_return_val_if_fail(math_view->interface != NULL, FALSE);  g_return_val_if_fail(math_view->drawing_area != NULL, FALSE);  scaled x0 = math_view->drawing_area->GetTopX();  scaled y0 = math_view->drawing_area->GetTopY();  if (event->x < 0) {    math_view->hadjustment->value -= math_view->hadjustment->step_increment;    gtk_adjustment_value_changed(math_view->hadjustment);  } else if (event->x > widget->allocation.width) {    math_view->hadjustment->value += math_view->hadjustment->step_increment;    gtk_adjustment_value_changed(math_view->hadjustment);  }  if (event->y < 0) {    math_view->vadjustment->value -= math_view->vadjustment->step_increment;    gtk_adjustment_value_changed(math_view->vadjustment);  } else if (event->y > widget->allocation.height) {    math_view->vadjustment->value += math_view->vadjustment->step_increment;    gtk_adjustment_value_changed(math_view->vadjustment);  }  math_view->select = math_view->button_press;  MathMLElement* elem = math_view->interface->GetElementAt(px2sp((gint) event->x) + x0, px2sp((gint) event->y) + y0);  if (math_view->select == TRUE && math_view->selected_first != NULL && elem != NULL) {    MathMLElement* oldRoot = math_view->selected_root;    math_view->selected_root = findCommonAncestor(math_view->selected_first, elem);    if (math_view->selected_root != NULL && math_view->selected_root != oldRoot) {      mDOMNodeRef node = math_view->selected_root->GetDOMNode();      gtk_signal_emit(GTK_OBJECT(math_view), selection_changed_signal, node);    }  } else {    if (elem != math_view->element) {      mDOMNodeRef node = (elem != NULL) ? elem->GetDOMNode() : NULL;      math_view->element = elem;      gtk_signal_emit(GTK_OBJECT(math_view), element_changed_signal, node);    }    MathMLActionElement* action = findActionElement(elem);    if (action != math_view->action_element) {      mDOMNodeRef node = (action != NULL) ? action->GetDOMNode() : NULL;      math_view->action_element = action;      gtk_signal_emit(GTK_OBJECT(math_view), action_changed_signal, node);    }  }  return FALSE;}