]> git.saurik.com Git - wxWidgets.git/blobdiff - src/gtk1/window.cpp
wxRichTextCtrl native caret now flashes, for wxMac/Core Graphics mode
[wxWidgets.git] / src / gtk1 / window.cpp
index d9c45bfa80383ed32da669cd97d6fb23d832773b..48d7db19273dad2e5e8660ef7e29cdc70316e92f 100644 (file)
@@ -49,7 +49,7 @@
 
 #include "wx/fontutil.h"
 
-#ifdef __WXDEBUG__
+#if wxDEBUG_LEVEL
     #include "wx/thread.h"
 #endif
 
@@ -236,16 +236,13 @@ extern bool g_mainThreadLocked;
 // debug
 //-----------------------------------------------------------------------------
 
-#ifdef __WXDEBUG__
-
 #if wxUSE_THREADS
-#   define DEBUG_MAIN_THREAD if (wxThread::IsMain() && g_mainThreadLocked) printf("gui reentrance");
+#   define DEBUG_MAIN_THREAD \
+        wxASSERT_MSG( !g_mainThreadLocked || !wxThread::IsMain(), \
+                      "GUI reentrancy detected" );
 #else
 #   define DEBUG_MAIN_THREAD
 #endif
-#else
-#define DEBUG_MAIN_THREAD
-#endif // Debug
 
 // the trace mask used for the focus debugging messages
 #define TRACE_FOCUS _T("focus")
@@ -3243,12 +3240,12 @@ int wxWindowGTK::GetCharWidth() const
     return gdk_string_width( gfont, "g" );
 }
 
-void wxWindowGTK::GetTextExtent( const wxString& string,
-                                 int *x,
-                                 int *y,
-                                 int *descent,
-                                 int *externalLeading,
-                                 const wxFont *theFont ) const
+void wxWindowGTK::DoGetTextExtent(const wxString& string,
+                                  int *x,
+                                  int *y,
+                                  int *descent,
+                                  int *externalLeading,
+                                  const wxFont *theFont) const
 {
     wxFont fontToUse = theFont ? *theFont : GetFont();