From: Robert Roebling Date: Fri, 29 Mar 2002 15:43:30 +0000 (+0000) Subject: Disabled masked bitmaps under GTK 2.0 until I know X-Git-Url: https://git.saurik.com/wxWidgets.git/commitdiff_plain/c7f624674056fad7af32c1aa4f5f304d5ca015c0 Disabled masked bitmaps under GTK 2.0 until I know why they crash. git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@14862 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775 --- diff --git a/src/gtk/bitmap.cpp b/src/gtk/bitmap.cpp index 634273f99e..92bd009d71 100644 --- a/src/gtk/bitmap.cpp +++ b/src/gtk/bitmap.cpp @@ -33,10 +33,7 @@ #ifdef __WXGTK20__ #include #else // GTK+ 1.2 - // VZ: is this still needed? seems to compile fine without it... - #if (GTK_MINOR_VERSION > 0) - #include - #endif + #include #endif // GTK+ 2.0/1.2 extern void gdk_wx_draw_bitmap (GdkDrawable *drawable, @@ -360,7 +357,7 @@ bool wxBitmap::CreateFromImage( const wxImage& image, int depth ) SetBitmap( gdk_pixmap_new( wxGetRootWindow()->window, width, height, 1 ) ); SetDepth( 1 ); - + GdkVisual *visual = wxTheApp->GetGdkVisual(); // Create picture image @@ -460,7 +457,7 @@ bool wxBitmap::CreateFromImage( const wxImage& image, int depth ) int bpp = visual->depth; SetDepth( bpp ); - + if ((bpp == 16) && (visual->red_mask != 0xf800)) bpp = 15; if (bpp < 8) bpp = 8; @@ -705,7 +702,7 @@ wxImage wxBitmap::ConvertToImage() const image.Create( GetWidth(), GetHeight() ); char unsigned *data = image.GetData(); - + if (!data) { gdk_image_destroy( gdk_image ); diff --git a/src/gtk/dcclient.cpp b/src/gtk/dcclient.cpp index d7eee8e5de..ffd39ac0a7 100644 --- a/src/gtk/dcclient.cpp +++ b/src/gtk/dcclient.cpp @@ -1010,6 +1010,10 @@ void wxWindowDC::DoDrawBitmap( const wxBitmap &bitmap, { use_bitmap = bitmap; } + +#ifdef __WXGTK20__ + useMask = FALSE; +#endif /* apply mask if any */ GdkBitmap *mask = (GdkBitmap *) NULL; diff --git a/src/gtk1/bitmap.cpp b/src/gtk1/bitmap.cpp index 634273f99e..92bd009d71 100644 --- a/src/gtk1/bitmap.cpp +++ b/src/gtk1/bitmap.cpp @@ -33,10 +33,7 @@ #ifdef __WXGTK20__ #include #else // GTK+ 1.2 - // VZ: is this still needed? seems to compile fine without it... - #if (GTK_MINOR_VERSION > 0) - #include - #endif + #include #endif // GTK+ 2.0/1.2 extern void gdk_wx_draw_bitmap (GdkDrawable *drawable, @@ -360,7 +357,7 @@ bool wxBitmap::CreateFromImage( const wxImage& image, int depth ) SetBitmap( gdk_pixmap_new( wxGetRootWindow()->window, width, height, 1 ) ); SetDepth( 1 ); - + GdkVisual *visual = wxTheApp->GetGdkVisual(); // Create picture image @@ -460,7 +457,7 @@ bool wxBitmap::CreateFromImage( const wxImage& image, int depth ) int bpp = visual->depth; SetDepth( bpp ); - + if ((bpp == 16) && (visual->red_mask != 0xf800)) bpp = 15; if (bpp < 8) bpp = 8; @@ -705,7 +702,7 @@ wxImage wxBitmap::ConvertToImage() const image.Create( GetWidth(), GetHeight() ); char unsigned *data = image.GetData(); - + if (!data) { gdk_image_destroy( gdk_image ); diff --git a/src/gtk1/dcclient.cpp b/src/gtk1/dcclient.cpp index d7eee8e5de..ffd39ac0a7 100644 --- a/src/gtk1/dcclient.cpp +++ b/src/gtk1/dcclient.cpp @@ -1010,6 +1010,10 @@ void wxWindowDC::DoDrawBitmap( const wxBitmap &bitmap, { use_bitmap = bitmap; } + +#ifdef __WXGTK20__ + useMask = FALSE; +#endif /* apply mask if any */ GdkBitmap *mask = (GdkBitmap *) NULL;