]> git.saurik.com Git - wxWidgets.git/blobdiff - src/gtk/window.cpp
Updated "make dist",
[wxWidgets.git] / src / gtk / window.cpp
index 65558e45ab2de5aab5f2436265fee62c3ab00475..908c2d82c35e0ef65aeb8803aa8c0c636dec5797 100644 (file)
@@ -210,7 +210,11 @@ extern bool g_mainThreadLocked;
 
 #ifdef __WXDEBUG__
 
-#define DEBUG_MAIN_THREAD if (wxThread::IsMain() && g_mainThreadLocked) printf("gui reentrance");
+#if wxUSE_THREADS
+#   define DEBUG_MAIN_THREAD if (wxThread::IsMain() && g_mainThreadLocked) printf("gui reentrance");
+#else
+#   define DEBUG_MAIN_THREAD
+#endif
 
 static gint gtk_debug_focus_in_callback( GtkWidget *WXUNUSED(widget),
                                          GdkEvent *WXUNUSED(event),
@@ -248,6 +252,8 @@ void debug_focus_in( GtkWidget* widget, const wxChar* name, const wxChar *window
     }
 }
 
+#else
+#define DEBUG_MAIN_THREAD
 #endif // Debug
 
 //-----------------------------------------------------------------------------
@@ -2983,7 +2989,7 @@ bool wxWindow::SetForegroundColour( const wxColour &colour )
 
 GtkStyle *wxWindow::GetWidgetStyle()
 {
-    if (m_widgetStyle) gtk_style_unref( m_widgetStyle );
+    if (m_widgetStyle) return m_widgetStyle;
 
     GtkStyle *def = gtk_rc_get_style( m_widget );
 
@@ -2991,7 +2997,6 @@ GtkStyle *wxWindow::GetWidgetStyle()
         def = gtk_widget_get_default_style();
 
     m_widgetStyle = gtk_style_copy( def );
-    m_widgetStyle->engine_data = def->engine_data;
     m_widgetStyle->klass = def->klass;
 
     return m_widgetStyle;