/* bring editable's cursor uptodate. bug in GTK. */
 
-        GTK_EDITABLE(m_text)->current_pos = pos;
+        GTK_EDITABLE(m_text)->current_pos = (guint32)pos;
     }
 }
 
     if ((key_event.KeyCode() == WXK_RETURN) && !(m_windowStyle & wxTE_MULTILINE))
     {
         wxWindow *top_frame = m_parent;
-        while (top_frame->GetParent() && !(top_frame->GetParent()->m_isFrame))
+        while (top_frame->GetParent() && !(top_frame->IsTopLevel()))
             top_frame = top_frame->GetParent();
        GtkWindow *window = GTK_WINDOW(top_frame->m_widget);