Index: chrome/browser/ui/gtk/browser_window_gtk.cc |
diff --git a/chrome/browser/ui/gtk/browser_window_gtk.cc b/chrome/browser/ui/gtk/browser_window_gtk.cc |
index 17af4fd1da1856a6c84315836aa6cf6d8dcde697..8365b0fcc58d93ee8b02363ff6e982107d4a3381 100644 |
--- a/chrome/browser/ui/gtk/browser_window_gtk.cc |
+++ b/chrome/browser/ui/gtk/browser_window_gtk.cc |
@@ -51,6 +51,7 @@ |
#include "chrome/browser/ui/gtk/edit_search_engine_dialog.h" |
#include "chrome/browser/ui/gtk/find_bar_gtk.h" |
#include "chrome/browser/ui/gtk/fullscreen_exit_bubble_gtk.h" |
+#include "chrome/browser/ui/gtk/global_menu_bar.h" |
#include "chrome/browser/ui/gtk/gtk_floating_container.h" |
#include "chrome/browser/ui/gtk/gtk_theme_service.h" |
#include "chrome/browser/ui/gtk/gtk_util.h" |
@@ -1543,6 +1544,13 @@ void BrowserWindowGtk::InitWidgets() { |
window_vbox_ = gtk_vbox_new(FALSE, 0); |
gtk_widget_show(window_vbox_); |
+ // We hold an always hiddent GtkMenuBar inside our browser window simply to |
Evan Stade
2011/04/11 19:01:35
hidden
|
+ // fool the Unity desktop, which will mirror the contents of the first |
+ // GtkMenuBar it sees into the global menu bar. (It doesn't seem to check the |
+ // visibility of the GtkMenuBar, so we can just permanently hide it.) |
+ global_menu_bar_.reset(new GlobalMenuBar(browser_.get(), this)); |
Evan Stade
2011/04/11 19:01:35
should this be disabled for some browser windows,
Elliot Glaysher
2011/04/11 23:18:52
Those windows would then lack menubars.
Evan Stade
2011/04/11 23:41:34
well, we don't show the wrench menu for popup wind
|
+ gtk_container_add(GTK_CONTAINER(window_vbox_), global_menu_bar_->widget()); |
+ |
// The window container draws the custom browser frame. |
window_container_ = gtk_alignment_new(0.0, 0.0, 1.0, 1.0); |
gtk_widget_set_name(window_container_, "chrome-custom-frame-border"); |