]> git.saurik.com Git - wxWidgets.git/blobdiff - src/gtk1/window.cpp
Wait() doesn't cancel the thread any longer
[wxWidgets.git] / src / gtk1 / window.cpp
index a3283de88354fcd155599d9d9d8e05c63960bad1..13eda5a41d732b61a8d055f14db806e026bdb474 100644 (file)
@@ -2194,11 +2194,11 @@ gtk_window_realized_callback( GtkWidget *m_widget, wxWindow *win )
 
     if (g_isIdle)
         wxapp_install_idle_handler();
-
-    if (win->m_delayedBackgroundColour)
+        
+    if (win->m_delayedBackgroundColour && !win->GetThemeEnabled())
         win->GtkSetBackgroundColour( win->GetBackgroundColour() );
 
-    if (win->m_delayedForegroundColour)
+    if (win->m_delayedForegroundColour && !win->GetThemeEnabled())
         win->GtkSetForegroundColour( win->GetForegroundColour() );
 
 #ifdef __WXGTK20__
@@ -3022,7 +3022,8 @@ void wxWindowGTK::OnInternalIdle()
         }
     }
 
-    UpdateWindowUI();
+    if (wxUpdateUIEvent::CanUpdate(this))
+        UpdateWindowUI(wxUPDATE_UI_FROMIDLE);
 }
 
 void wxWindowGTK::DoGetSize( int *width, int *height ) const
@@ -4214,8 +4215,7 @@ bool wxWindowGTK::DoPopupMenu( wxMenu *menu, int x, int y )
 
     while (is_waiting)
     {
-        while (gtk_events_pending())
-            gtk_main_iteration();
+        gtk_main_iteration();
     }
 
     return TRUE;