From 53f3088ea1ace0ad2e1d54847daa82a38ea57e86 Mon Sep 17 00:00:00 2001 From: Robert Roebling Date: Mon, 6 Oct 2003 15:58:35 +0000 Subject: [PATCH] Fixed bitmap problems reported a week ago on the list. git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/branches/WX_2_4_BRANCH@24101 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775 --- src/gtk/dcclient.cpp | 13 +++++++------ src/gtk1/dcclient.cpp | 13 +++++++------ 2 files changed, 14 insertions(+), 12 deletions(-) diff --git a/src/gtk/dcclient.cpp b/src/gtk/dcclient.cpp index 2ef77d4f3b..d011196dee 100644 --- a/src/gtk/dcclient.cpp +++ b/src/gtk/dcclient.cpp @@ -101,8 +101,9 @@ void gdk_wx_draw_bitmap(GdkDrawable *drawable, g_return_if_fail (gc != NULL); #ifdef __WXGTK20__ - if (GDK_WINDOW_DESTROYED(drawable) || GDK_WINDOW_DESTROYED(src)) - return; + // This doesn't seem to exist for bitmaps (1-bit) + // if (GDK_WINDOW_DESTROYED(drawable) || GDK_WINDOW_DESTROYED(src)) + // return; gdk_drawable_get_size(src, &src_width, &src_height); #else @@ -193,7 +194,7 @@ static void wxInitGCPool() // If we cannot malloc, then fail with error // when debug is enabled. If debug is not enabled, // the problem will eventually get caught - // in wxGetPoolGC. + // in wxGetPoolGC. wxFAIL_MSG( wxT("Cannot allocate GC pool") ); return; } @@ -239,13 +240,13 @@ static GdkGC* wxGetPoolGC( GdkWindow *window, wxPoolGCType type ) // We did not find an available GC. // We need to grow the GC pool. pptr = (wxGC *)realloc(wxGCPool, - (wxGCPoolSize + GC_POOL_ALLOC_SIZE)*sizeof(wxGC)); + (wxGCPoolSize + GC_POOL_ALLOC_SIZE)*sizeof(wxGC)); if (pptr != NULL) { // Initialize newly allocated pool. wxGCPool = pptr; - memset(&wxGCPool[wxGCPoolSize], 0, - GC_POOL_ALLOC_SIZE*sizeof(wxGC)); + memset(&wxGCPool[wxGCPoolSize], 0, + GC_POOL_ALLOC_SIZE*sizeof(wxGC)); // Initialize entry we will return. wxGCPool[wxGCPoolSize].m_gc = gdk_gc_new( window ); diff --git a/src/gtk1/dcclient.cpp b/src/gtk1/dcclient.cpp index 2ef77d4f3b..d011196dee 100644 --- a/src/gtk1/dcclient.cpp +++ b/src/gtk1/dcclient.cpp @@ -101,8 +101,9 @@ void gdk_wx_draw_bitmap(GdkDrawable *drawable, g_return_if_fail (gc != NULL); #ifdef __WXGTK20__ - if (GDK_WINDOW_DESTROYED(drawable) || GDK_WINDOW_DESTROYED(src)) - return; + // This doesn't seem to exist for bitmaps (1-bit) + // if (GDK_WINDOW_DESTROYED(drawable) || GDK_WINDOW_DESTROYED(src)) + // return; gdk_drawable_get_size(src, &src_width, &src_height); #else @@ -193,7 +194,7 @@ static void wxInitGCPool() // If we cannot malloc, then fail with error // when debug is enabled. If debug is not enabled, // the problem will eventually get caught - // in wxGetPoolGC. + // in wxGetPoolGC. wxFAIL_MSG( wxT("Cannot allocate GC pool") ); return; } @@ -239,13 +240,13 @@ static GdkGC* wxGetPoolGC( GdkWindow *window, wxPoolGCType type ) // We did not find an available GC. // We need to grow the GC pool. pptr = (wxGC *)realloc(wxGCPool, - (wxGCPoolSize + GC_POOL_ALLOC_SIZE)*sizeof(wxGC)); + (wxGCPoolSize + GC_POOL_ALLOC_SIZE)*sizeof(wxGC)); if (pptr != NULL) { // Initialize newly allocated pool. wxGCPool = pptr; - memset(&wxGCPool[wxGCPoolSize], 0, - GC_POOL_ALLOC_SIZE*sizeof(wxGC)); + memset(&wxGCPool[wxGCPoolSize], 0, + GC_POOL_ALLOC_SIZE*sizeof(wxGC)); // Initialize entry we will return. wxGCPool[wxGCPoolSize].m_gc = gdk_gc_new( window );