From f3f2017007c1424a21b6cf5586c59a1fe2cf456a Mon Sep 17 00:00:00 2001 From: "agl@chromium.org" Date: Thu, 26 Feb 2009 02:26:07 +0000 Subject: Linux: fixes for tab contents switching Previously, removing a view_ from its container destroyed it. We fix this by disabling GTK's auto reference stealing. git-svn-id: svn://svn.chromium.org/chrome/trunk/src@10440 0039d316-1c4b-4281-b951-d872f2087c98 --- chrome/browser/gtk/tab_contents_container_gtk.cc | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'chrome/browser/gtk/tab_contents_container_gtk.cc') diff --git a/chrome/browser/gtk/tab_contents_container_gtk.cc b/chrome/browser/gtk/tab_contents_container_gtk.cc index 46a8d42..78eeb0d 100644 --- a/chrome/browser/gtk/tab_contents_container_gtk.cc +++ b/chrome/browser/gtk/tab_contents_container_gtk.cc @@ -27,9 +27,8 @@ void TabContentsContainerGtk::AddContainerToBox(GtkWidget* box) { void TabContentsContainerGtk::SetTabContents(TabContents* tab_contents) { if (tab_contents_) { gfx::NativeView widget = tab_contents_->GetNativeView(); - if (widget) { + if (widget) gtk_container_remove(GTK_CONTAINER(vbox_), widget); - } tab_contents_->WasHidden(); @@ -46,6 +45,7 @@ void TabContentsContainerGtk::SetTabContents(TabContents* tab_contents) { gfx::NativeView widget = tab_contents_->GetNativeView(); if (widget) { gtk_box_pack_start(GTK_BOX(vbox_), widget, TRUE, TRUE, 0); + gtk_widget_show_all(widget); } } } -- cgit v1.1