]> git.saurik.com Git - wxWidgets.git/blobdiff - src/gtk1/window.cpp
added alpha channel support
[wxWidgets.git] / src / gtk1 / window.cpp
index f0ad684ed777b296cfea7e1a7001a3b50d6b2158..a461e3b7e889eb862560e142e1ea9d34c47e4649 100644 (file)
@@ -2946,6 +2946,8 @@ void wxWindowGTK::PostCreation()
                             (gpointer) this );
     }
 
                             (gpointer) this );
     }
 
+    InheritAttributes();
+
     m_hasVMT = TRUE;
 
     // unless the window was created initially hidden (i.e. Hide() had been
     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);
     }
         DoApplyWidgetStyle(style);
         gtk_rc_style_unref(style);
     }
+
+    // Style change may affect GTK+'s size calculation:
+    InvalidateBestSize();
 }
 
 void wxWindowGTK::DoApplyWidgetStyle(GtkRcStyle *style)
 {
     if (m_wxwindow)
 }
 
 void wxWindowGTK::DoApplyWidgetStyle(GtkRcStyle *style)
 {
     if (m_wxwindow)
-        // should we also do m_widget in this case?
         gtk_widget_modify_style(m_wxwindow, style);
         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;
 
 
     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;
 
     wxPoint pos;
     gpointer userdata;
@@ -4341,6 +4344,8 @@ bool wxWindowGTK::DoPopupMenu( wxMenu *menu, int x, int y )
         gtk_main_iteration();
     }
 
         gtk_main_iteration();
     }
 
+    gtk_signal_disconnect(GTK_OBJECT(menu->m_menu), handler);
+
     return true;
 }
 
     return true;
 }