]> git.saurik.com Git - wxWidgets.git/blobdiff - src/gtk1/toplevel.cpp
wxPuts() should output a trailing newline even in Unix/Unicode builds
[wxWidgets.git] / src / gtk1 / toplevel.cpp
index cb412255ebb9ee9163377d52d57cdd2ad3b93ce1..f6761890955e249842f22d5e5ff0634113facd42 100644 (file)
@@ -87,7 +87,7 @@ static gint gtk_frame_focus_in_callback( GtkWidget *widget,
 {
     if (g_isIdle)
         wxapp_install_idle_handler();
-
+        
     switch ( g_sendActivateEvent )
     {
         case -1:
@@ -112,7 +112,7 @@ static gint gtk_frame_focus_in_callback( GtkWidget *widget,
     event.SetEventObject(g_activeFrame);
     g_activeFrame->GetEventHandler()->ProcessEvent(event);
 
-    return TRUE;
+    return FALSE;
 }
 
 //-----------------------------------------------------------------------------
@@ -142,7 +142,7 @@ static gint gtk_frame_focus_out_callback( GtkWidget *widget,
 
     g_activeFrame = NULL;
         
-    return TRUE;
+    return FALSE;
 }
 
 //-----------------------------------------------------------------------------
@@ -451,11 +451,13 @@ bool wxTopLevelWindowGTK::Create( wxWindow *parent,
         }
     }
 
-    if (m_parent && (((GTK_IS_WINDOW(m_parent->m_widget)) &&
+    wxWindow *topParent = wxGetTopLevelParent(m_parent);
+    if (topParent && (((GTK_IS_WINDOW(topParent->m_widget)) &&
                      (GetExtraStyle() & wxTOPLEVEL_EX_DIALOG)) ||
                     (style & wxFRAME_FLOAT_ON_PARENT)))
     {
-        gtk_window_set_transient_for( GTK_WINDOW(m_widget), GTK_WINDOW(m_parent->m_widget) );
+        gtk_window_set_transient_for( GTK_WINDOW(m_widget),
+                                      GTK_WINDOW(topParent->m_widget) );
     }
 
 #if GTK_CHECK_VERSION(2,2,0)
@@ -965,6 +967,9 @@ void wxTopLevelWindowGTK::OnInternalIdle()
     {
         bool activate = g_sendActivateEvent != 0;
         
+        // if (!activate) wxPrintf( wxT("de") );
+        // wxPrintf( wxT("activate\n") );
+        
         // do it only once
         g_sendActivateEvent = -1;