X-Git-Url: https://git.saurik.com/wxWidgets.git/blobdiff_plain/b0e282b34d7bf24406bd6b94fab31fbe654253dd..523050b607cfb5e6f9dfcb1544eb4f49ec1978cd:/src/gtk1/spinctrl.cpp

diff --git a/src/gtk1/spinctrl.cpp b/src/gtk1/spinctrl.cpp
index d5efca072e..db68c07d70 100644
--- a/src/gtk1/spinctrl.cpp
+++ b/src/gtk1/spinctrl.cpp
@@ -222,7 +222,7 @@ void wxSpinCtrl::OnChar( wxKeyEvent &event )
     if (event.KeyCode() == WXK_RETURN)
     {
         wxWindow *top_frame = m_parent;
-        while (top_frame->GetParent() && !(top_frame->GetParent()->m_isFrame))
+        while (top_frame->GetParent() && !(top_frame->GetParent()->IsTopLevel()))
             top_frame = top_frame->GetParent();
         GtkWindow *window = GTK_WINDOW(top_frame->m_widget);