]> git.saurik.com Git - wxWidgets.git/blobdiff - src/gtk/toplevel.cpp
Avoid GTK+ errors when using AUI wxPseudoTransparentFrame hack.
[wxWidgets.git] / src / gtk / toplevel.cpp
index 637d1fef67d7b71e3eede6aedfeb094fa2a57bf7..2b7194d3eb36b3a7f84359a75ce81d43b87a042f 100644 (file)
@@ -358,6 +358,8 @@ gtk_frame_map_callback( GtkWidget*,
         eventShow.SetEventObject(win);
         win->GetEventHandler()->ProcessEvent(eventShow);
     }
+    // restore focus-on-map setting in case ShowWithoutActivating() was called
+    gtk_window_set_focus_on_map(GTK_WINDOW(win->m_widget), true);
     return false;
 }
 }
@@ -556,7 +558,7 @@ bool wxTopLevelWindowGTK::Create( wxWindow *parent,
     gtk_container_add( GTK_CONTAINER(m_widget), m_mainWidget );
 
     // m_wxwindow is the client area
-    m_wxwindow = wxPizza::New(0,this);
+    m_wxwindow = wxPizza::New();
     gtk_widget_show( m_wxwindow );
     gtk_container_add( GTK_CONTAINER(m_mainWidget), m_wxwindow );
 
@@ -889,6 +891,15 @@ bool wxTopLevelWindowGTK::Show( bool show )
     return change;
 }
 
+void wxTopLevelWindowGTK::ShowWithoutActivating()
+{
+    if (!m_isShown)
+    {
+        gtk_window_set_focus_on_map(GTK_WINDOW(m_widget), false);
+        Show(true);
+    }
+}
+
 void wxTopLevelWindowGTK::Raise()
 {
     gtk_window_present( GTK_WINDOW( m_widget ) );