diff --git a/contrib/src/stc/PlatWX.cpp b/contrib/src/stc/PlatWX.cpp index d23d0a981b..dad221dbd2 100644 --- a/contrib/src/stc/PlatWX.cpp +++ b/contrib/src/stc/PlatWX.cpp @@ -284,9 +284,15 @@ bool SurfaceImpl::Initialised() { } void SurfaceImpl::Init() { +#if 0 Release(); hdc = new wxMemoryDC(); hdcOwned = true; +#else + // On Mac and GTK(?) the DC is not really valid until it has a bitmap + // selected into it. So instead of just creating the DC with no bitmap, + // go ahead and give it one. + InitPixMap(1,1,NULL); } void SurfaceImpl::Init(SurfaceID hdc_) { diff --git a/src/stc/PlatWX.cpp b/src/stc/PlatWX.cpp index d23d0a981b..dad221dbd2 100644 --- a/src/stc/PlatWX.cpp +++ b/src/stc/PlatWX.cpp @@ -284,9 +284,15 @@ bool SurfaceImpl::Initialised() { } void SurfaceImpl::Init() { +#if 0 Release(); hdc = new wxMemoryDC(); hdcOwned = true; +#else + // On Mac and GTK(?) the DC is not really valid until it has a bitmap + // selected into it. So instead of just creating the DC with no bitmap, + // go ahead and give it one. + InitPixMap(1,1,NULL); } void SurfaceImpl::Init(SurfaceID hdc_) {