]> git.saurik.com Git - wxWidgets.git/blobdiff - src/gtk/window.cpp
delayed destruction of global memLocker object
[wxWidgets.git] / src / gtk / window.cpp
index be6e24913ea1e24b10df5c6caf29cf0a339c1a38..bfb8c228f851cf774649eb617c42f1bac6cd2d55 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;
         }
 
@@ -3904,7 +3904,7 @@ void wxWindowGTK::GtkSendPaintEvents()
                 g_eraseGC = gdk_gc_new( pizza->bin_window );
                 gdk_gc_set_fill( g_eraseGC, GDK_SOLID );
             }
-            gdk_gc_set_foreground( g_eraseGC, m_backgroundColour.GetColor() );
+            gdk_gc_set_foreground( g_eraseGC, GetBackgroundColour().GetColor() );
 
             wxRegionIterator upd( m_clearRegion );
             while (upd)
@@ -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))