]> git.saurik.com Git - wxWidgets.git/blobdiff - src/gtk1/window.cpp
undid one of the last SWIG tweaks
[wxWidgets.git] / src / gtk1 / window.cpp
index be6e24913ea1e24b10df5c6caf29cf0a339c1a38..ddf29e51e6cce852b4a20a8bae11997ee3c182e6 100644 (file)
@@ -3009,13 +3009,13 @@ void wxWindowGTK::DoSetSize( int x, int y, int width, int height, int sizeFlags
         }
 
         // calculate the best size if we should auto size the window
-        if ( (sizeFlags & wxSIZE_AUTO_WIDTH) ||
-                (sizeFlags & wxSIZE_AUTO_HEIGHT) )
+        if ( ((sizeFlags & wxSIZE_AUTO_WIDTH) && width == -1) ||
+                ((sizeFlags & wxSIZE_AUTO_HEIGHT) && height == -1) )
         {
             const wxSize sizeBest = GetBestSize();
-            if ( sizeFlags & wxSIZE_AUTO_WIDTH )
+            if ( (sizeFlags & wxSIZE_AUTO_WIDTH) && width == -1 )
                 width = sizeBest.x;
-            if ( sizeFlags & wxSIZE_AUTO_HEIGHT )
+            if ( (sizeFlags & wxSIZE_AUTO_HEIGHT) && height == -1 )
                 height = sizeBest.y;
         }
 
@@ -4206,7 +4206,7 @@ void wxWindowGTK::SetWidgetStyle()
         }
     }
 
-    if ( m_hasBgCol )
+    if ( m_hasBgCol && m_backgroundColour.Ok() )
     {
         m_backgroundColour.CalcPixel( gtk_widget_get_colormap( m_widget ) );
         if (m_backgroundColour != wxSystemSettings::GetColour(wxSYS_COLOUR_BTNFACE))