b=621962 don't realize unnecessary windows for stock image widget r=roc
authorKarl Tomlinson <karlt+@karlt.net>
Thu, 03 Feb 2011 12:22:09 -0500
changeset 61852 9a9f6f3eec6ba9acb0249e3d8e4310770c40d59d
parent 61851 bc23b0490406ea8019ba9f7e5e193c60354642dc
child 61853 57536671a3637d216f06e1f28b0ddf8b8c5250d3
push idunknown
push userunknown
push dateunknown
reviewersroc
bugs621962
milestone2.0b12pre
b=621962 don't realize unnecessary windows for stock image widget r=roc
modules/libpr0n/decoders/icon/gtk/nsIconChannel.cpp
--- a/modules/libpr0n/decoders/icon/gtk/nsIconChannel.cpp
+++ b/modules/libpr0n/decoders/icon/gtk/nsIconChannel.cpp
@@ -165,23 +165,23 @@ static GnomeIconTheme *gIconTheme = nsnu
 
 static GtkIconFactory *gIconFactory = nsnull;
 
 static void
 ensure_stock_image_widget()
 {
   if (!gProtoWindow) {
     gProtoWindow = gtk_window_new(GTK_WINDOW_POPUP);
-    gtk_widget_realize(gProtoWindow);
     GtkWidget* protoLayout = gtk_fixed_new();
     gtk_container_add(GTK_CONTAINER(gProtoWindow), protoLayout);
 
     gStockImageWidget = gtk_image_new();
     gtk_container_add(GTK_CONTAINER(protoLayout), gStockImageWidget);
-    gtk_widget_realize(gStockImageWidget);
+
+    gtk_widget_ensure_style(gStockImageWidget);
   }
 }
 
 static void
 ensure_icon_factory()
 {
   if (!gIconFactory) {
     gIconFactory = gtk_icon_factory_new();