diff options
author | estade@chromium.org <estade@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2009-06-26 19:53:21 +0000 |
---|---|---|
committer | estade@chromium.org <estade@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2009-06-26 19:53:21 +0000 |
commit | c99a16ab889a22fcf24479a9284daa22a10eabc6 (patch) | |
tree | 3d83ea2796ca8d5105ce6fe6701065598792c790 | |
parent | f7e615a546e789ab97ecd21a4ce78036960b1476 (diff) | |
download | chromium_src-c99a16ab889a22fcf24479a9284daa22a10eabc6.zip chromium_src-c99a16ab889a22fcf24479a9284daa22a10eabc6.tar.gz chromium_src-c99a16ab889a22fcf24479a9284daa22a10eabc6.tar.bz2 |
Fix download shelf z ordering during close.
Pretty much the same as what we do in the find bar. I think the flickering thing in the bug desc. was another result of <http://crbug.com/14786>, as it was only present in 3.0.190.2 and not ToT, and toggling the bookmark bar fixed it.
http://crbug.com/15427
TEST=see bug
Review URL: http://codereview.chromium.org/149054
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@19401 0039d316-1c4b-4281-b951-d872f2087c98
-rw-r--r-- | chrome/browser/gtk/download_shelf_gtk.cc | 14 |
1 files changed, 11 insertions, 3 deletions
diff --git a/chrome/browser/gtk/download_shelf_gtk.cc b/chrome/browser/gtk/download_shelf_gtk.cc index ab5e4c3..ceb8979 100644 --- a/chrome/browser/gtk/download_shelf_gtk.cc +++ b/chrome/browser/gtk/download_shelf_gtk.cc @@ -79,9 +79,14 @@ DownloadShelfGtk::DownloadShelfGtk(Browser* browser, GtkWidget* parent) gtk_container_add(GTK_CONTAINER(padding), hbox_.get()); gtk_widget_modify_bg(padding_bg, GTK_STATE_NORMAL, &kBackgroundColor); - shelf_.Own(gtk_vbox_new(FALSE, 0)); - gtk_box_pack_start(GTK_BOX(shelf_.get()), top_border, FALSE, FALSE, 0); - gtk_box_pack_start(GTK_BOX(shelf_.get()), padding_bg, FALSE, FALSE, 0); + GtkWidget* vbox = gtk_vbox_new(FALSE, 0); + gtk_box_pack_start(GTK_BOX(vbox), top_border, FALSE, FALSE, 0); + gtk_box_pack_start(GTK_BOX(vbox), padding_bg, FALSE, FALSE, 0); + + // Put the shelf in an event box so it gets its own window, which makes it + // easier to get z-ordering right. + shelf_.Own(gtk_event_box_new()); + gtk_container_add(GTK_CONTAINER(shelf_.get()), vbox); // Create and pack the close button. close_button_.reset(CustomDrawButton::CloseButton()); @@ -151,6 +156,9 @@ void DownloadShelfGtk::Show() { } void DownloadShelfGtk::Close() { + // When we are closing, we can vertically overlap the render view. Make sure + // we are on top. + gdk_window_raise(shelf_.get()->window); slide_widget_->Close(); // TODO(estade): Remove. The status bubble should query its window instead. |