X-Git-Url: https://git.saurik.com/wxWidgets.git/blobdiff_plain/75625d796cb7ea32ecb2c0526159180cb2352680..68d4172048cfc0f3e658ef90ff5af926eedfdd57:/src/gtk1/window.cpp diff --git a/src/gtk1/window.cpp b/src/gtk1/window.cpp index 7339c08f07..13eda5a41d 100644 --- a/src/gtk1/window.cpp +++ b/src/gtk1/window.cpp @@ -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__ @@ -2450,8 +2450,10 @@ void wxWindowGTK::Init() m_hAdjust = (GtkAdjustment*) NULL; m_vAdjust = (GtkAdjustment*) NULL; - m_oldHorizontalPos = 0.0; + m_oldHorizontalPos = m_oldVerticalPos = 0.0; + m_oldClientWidth = + m_oldClientHeight = 0; m_resizing = FALSE; m_widgetStyle = (GtkStyle*) NULL; @@ -3020,7 +3022,8 @@ void wxWindowGTK::OnInternalIdle() } } - UpdateWindowUI(); + if (wxUpdateUIEvent::CanUpdate(this)) + UpdateWindowUI(wxUPDATE_UI_FROMIDLE); } void wxWindowGTK::DoGetSize( int *width, int *height ) const @@ -4047,7 +4050,7 @@ void wxWindowGTK::SetWidgetStyle() { #ifdef __WXGTK20__ pango_font_description_free( style->font_desc ); - pango_font_description_copy( m_font.GetNativeFontInfo()->description ); + style->font_desc = pango_font_description_copy( m_font.GetNativeFontInfo()->description ); #else gdk_font_unref( style->font ); style->font = gdk_font_ref( m_font.GetInternalFont( 1.0 ) ); @@ -4212,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;