]> git.saurik.com Git - wxWidgets.git/blobdiff - src/gtk/spinctrl.cpp
In the object destructor, leave m_cocoaNSView intact for base class destructors
[wxWidgets.git] / src / gtk / spinctrl.cpp
index f04242957b61740f341122b9bd49d65b8befe85a..2fbffa6771a82d5cbb49a563aca6316bb634104c 100644 (file)
@@ -255,7 +255,7 @@ void wxSpinCtrl::OnChar( wxKeyEvent &event )
 {
     wxCHECK_RET( m_widget != NULL, wxT("invalid spin ctrl") );
 
-    if (event.KeyCode() == WXK_RETURN)
+    if (event.GetKeyCode() == WXK_RETURN)
     {
         wxWindow *top_frame = m_parent;
         while (top_frame->GetParent() && !(top_frame->GetParent()->IsTopLevel()))
@@ -282,7 +282,11 @@ void wxSpinCtrl::OnChar( wxKeyEvent &event )
 
 bool wxSpinCtrl::IsOwnGtkWindow( GdkWindow *window )
 {
-    return GTK_SPIN_BUTTON(m_widget)->panel == window;
+    if (GTK_SPIN_BUTTON(m_widget)->entry.text_area == window) return TRUE;
+    
+    if (GTK_SPIN_BUTTON(m_widget)->panel == window) return TRUE;
+
+    return FALSE;
 }
 
 void wxSpinCtrl::ApplyWidgetStyle()