X-Git-Url: https://git.saurik.com/wxWidgets.git/blobdiff_plain/fe51e08c278f1fa429b9f02843c771c7a9bb7e0c..ab86c659ac3093dc5513ff0c5001d2fa2979b30c:/src/gtk1/window.cpp?ds=sidebyside diff --git a/src/gtk1/window.cpp b/src/gtk1/window.cpp index f0ad684ed7..a461e3b7e8 100644 --- a/src/gtk1/window.cpp +++ b/src/gtk1/window.cpp @@ -2946,6 +2946,8 @@ void wxWindowGTK::PostCreation() (gpointer) this ); } + InheritAttributes(); + m_hasVMT = TRUE; // unless the window was created initially hidden (i.e. Hide() had been @@ -4228,15 +4230,16 @@ void wxWindowGTK::ApplyWidgetStyle(bool forceStyle) DoApplyWidgetStyle(style); gtk_rc_style_unref(style); } + + // Style change may affect GTK+'s size calculation: + InvalidateBestSize(); } void wxWindowGTK::DoApplyWidgetStyle(GtkRcStyle *style) { if (m_wxwindow) - // should we also do m_widget in this case? gtk_widget_modify_style(m_wxwindow, style); - else - gtk_widget_modify_style(m_widget, style); + gtk_widget_modify_style(m_widget, style); } @@ -4301,10 +4304,10 @@ bool wxWindowGTK::DoPopupMenu( wxMenu *menu, int x, int y ) bool is_waiting = true; - gtk_signal_connect( GTK_OBJECT(menu->m_menu), - "hide", - GTK_SIGNAL_FUNC(gtk_pop_hide_callback), - (gpointer)&is_waiting ); + gulong handler = gtk_signal_connect( GTK_OBJECT(menu->m_menu), + "hide", + GTK_SIGNAL_FUNC(gtk_pop_hide_callback), + (gpointer)&is_waiting ); wxPoint pos; gpointer userdata; @@ -4341,6 +4344,8 @@ bool wxWindowGTK::DoPopupMenu( wxMenu *menu, int x, int y ) gtk_main_iteration(); } + gtk_signal_disconnect(GTK_OBJECT(menu->m_menu), handler); + return true; }