X-Git-Url: https://git.saurik.com/wxWidgets.git/blobdiff_plain/1542ea396a625766c59d683adbb1d613c1344d50..b77b87881bae2e6306366d79e7fe160334b3d4a2:/src/gtk/toplevel.cpp diff --git a/src/gtk/toplevel.cpp b/src/gtk/toplevel.cpp index 52c47e327f..9660e9d30e 100644 --- a/src/gtk/toplevel.cpp +++ b/src/gtk/toplevel.cpp @@ -15,10 +15,13 @@ // 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) {