]> git.saurik.com Git - wxWidgets.git/blobdiff - src/gtk1/textctrl.cpp
Use gdk_window_invalidate instead of gtk_widget_queue_draw as the latter doesn't...
[wxWidgets.git] / src / gtk1 / textctrl.cpp
index 7fc484906b7cbf5349d270c396ed7b52e8096945..ad7be3702caa9be4d44ed23dc69963d79e91da9c 100644 (file)
@@ -24,6 +24,7 @@
 
 #include "wx/strconv.h"
 #include "wx/fontutil.h"        // for wxNativeFontInfo (GetNativeFontInfo())
 
 #include "wx/strconv.h"
 #include "wx/fontutil.h"        // for wxNativeFontInfo (GetNativeFontInfo())
+#include "wx/evtloop.h"
 
 #include <sys/types.h>
 #include <sys/stat.h>
 
 #include <sys/types.h>
 #include <sys/stat.h>
@@ -185,7 +186,8 @@ static GtkDrawCallback gs_gtk_text_draw = NULL;
 extern "C" {
 static void wxgtk_text_draw( GtkWidget *widget, GdkRectangle *rect)
 {
 extern "C" {
 static void wxgtk_text_draw( GtkWidget *widget, GdkRectangle *rect)
 {
-    if ( !wxTheApp->IsYielding() )
+    wxEventLoopBase* loop = wxEventLoopBase::GetActive();
+    if ( loop && !loop->IsYielding() )
     {
         wxCHECK_RET( gs_gtk_text_draw != wxgtk_text_draw,
                      _T("infinite recursion in wxgtk_text_draw aborted") );
     {
         wxCHECK_RET( gs_gtk_text_draw != wxgtk_text_draw,
                      _T("infinite recursion in wxgtk_text_draw aborted") );