]> git.saurik.com Git - wxWidgets.git/blobdiff - src/gtk/toplevel.cpp
Correct query for formats supported by wxDataObject in wxGTK wxClipboard.
[wxWidgets.git] / src / gtk / toplevel.cpp
index 2b7194d3eb36b3a7f84359a75ce81d43b87a042f..d0f1b1e59d83590524fd54c04b13906f5aeb799a 100644 (file)
@@ -358,8 +358,15 @@ 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);
+
+#if GTK_CHECK_VERSION(2,6,0)
+    if (!gtk_check_version(2,6,0))
+    {
+        // restore focus-on-map setting in case ShowWithoutActivating() was called
+        gtk_window_set_focus_on_map(GTK_WINDOW(win->m_widget), true);
+    }
+#endif // GTK+ 2.6+
+
     return false;
 }
 }
@@ -539,6 +546,8 @@ bool wxTopLevelWindowGTK::Create( wxWindow *parent,
     {
         gtk_window_set_keep_above(GTK_WINDOW(m_widget), TRUE);
     }
+    if (style & wxMAXIMIZE)
+        gtk_window_maximize(GTK_WINDOW(m_widget));
 
 #if 0
     if (!name.empty())
@@ -895,7 +904,11 @@ void wxTopLevelWindowGTK::ShowWithoutActivating()
 {
     if (!m_isShown)
     {
-        gtk_window_set_focus_on_map(GTK_WINDOW(m_widget), false);
+#if GTK_CHECK_VERSION(2,6,0)
+        if (!gtk_check_version(2,6,0))
+            gtk_window_set_focus_on_map(GTK_WINDOW(m_widget), false);
+#endif // GTK+ 2.6+
+
         Show(true);
     }
 }
@@ -991,10 +1004,12 @@ void wxTopLevelWindowGTK::DoSetSize( int x, int y, int width, int height, int si
 
 void wxTopLevelWindowGTK::DoSetClientSize(int width, int height)
 {
+    wxTopLevelWindowBase::DoSetClientSize(width, height);
+
     // Since client size is being explicitly set, don't change it later
+    // Has to be done after calling base because it calls SetSize,
+    // which sets this true
     m_deferShowAllowed = false;
-
-    wxTopLevelWindowBase::DoSetClientSize(width, height);
 }
 
 void wxTopLevelWindowGTK::DoGetClientSize( int *width, int *height ) const
@@ -1404,7 +1419,7 @@ bool wxTopLevelWindowGTK::SetTransparent(wxByte alpha)
 bool wxTopLevelWindowGTK::CanSetTransparent()
 {
     // allow to override automatic detection as it's far from perfect
-    static const wxChar *SYSOPT_TRANSPARENT = wxT("gtk.tlw.can-set-transparent");
+    const wxString SYSOPT_TRANSPARENT = "gtk.tlw.can-set-transparent";
     if ( wxSystemOptions::HasOption(SYSOPT_TRANSPARENT) )
     {
         return wxSystemOptions::GetOptionInt(SYSOPT_TRANSPARENT) != 0;