]> git.saurik.com Git - wxWidgets.git/blobdiff - src/gtk/toplevel.cpp
fix for infinite loop in wxFileConfig when reading from input stream fails (patch...
[wxWidgets.git] / src / gtk / toplevel.cpp
index 52c47e327f40701caafc6e3bcc8ce89844c53022..9660e9d30eb6fd47b7f21845b4e345b6cdf2e583 100644 (file)
 // headers
 // ----------------------------------------------------------------------------
 
-#ifdef __GNUG__
+#if defined(__GNUG__) && !defined(NO_GCC_PRAGMA)
     #pragma implementation "toplevel.h"
 #endif
 
+// For compilers that support precompilation, includes "wx.h".
+#include "wx/wxprec.h"
+
 #ifdef __VMS
 #define XIconifyWindow XICONIFYWINDOW
 #endif
@@ -989,7 +992,7 @@ static bool do_shape_combine_region(GdkWindow* window, const wxRegion& region)
         gdk_window_shape_combine_region(window, region.GetRegion(), 0, 0);
 #else
         wxBitmap bmp = region.ConvertToBitmap();
-        bmp.SetMask(new wxMask(bmp, *wxWHITE));
+        bmp.SetMask(new wxMask(bmp, *wxBLACK));
         GdkBitmap* mask = bmp.GetMask()->GetBitmap();
         gdk_window_shape_combine_mask(window, mask, 0, 0);
 #endif
@@ -1002,6 +1005,9 @@ static bool do_shape_combine_region(GdkWindow* window, const wxRegion& region)
 
 bool wxTopLevelWindowGTK::SetShape(const wxRegion& region)
 {
+    wxCHECK_MSG( HasFlag(wxFRAME_SHAPED), FALSE,
+                 _T("Shaped windows must be created with the wxFRAME_SHAPED style."));
+
     GdkWindow *window = NULL;
     if (m_wxwindow)
     {