summaryrefslogtreecommitdiffstats
path: root/chrome/browser/gtk
diff options
context:
space:
mode:
authorestade@chromium.org <estade@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2010-08-11 22:20:53 +0000
committerestade@chromium.org <estade@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2010-08-11 22:20:53 +0000
commit79769d2ab902e247dd377a58a3342caf9412ad5a (patch)
treee5254d0d7c8ab3b22c4868c8c85c4fced7c00f06 /chrome/browser/gtk
parent5c8e00570c198b8705f5674a1e18518a186f7fbb (diff)
downloadchromium_src-79769d2ab902e247dd377a58a3342caf9412ad5a.zip
chromium_src-79769d2ab902e247dd377a58a3342caf9412ad5a.tar.gz
chromium_src-79769d2ab902e247dd377a58a3342caf9412ad5a.tar.bz2
GTK: minor MenuBarHelper fix.
If one of the buttons is not realized, gtk_widget_translate_coordinates() will fail on it. Instead of aborting, just skip to the next button. This can happen when opening a new window with a bookmark bar that doesn't have an overflow chevron (when the chevron has not been shown, it will be unrealized). BUG=51810 TESt=see bug + above description Review URL: http://codereview.chromium.org/3175006 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@55799 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'chrome/browser/gtk')
-rw-r--r--chrome/browser/gtk/menu_bar_helper.cc4
1 files changed, 2 insertions, 2 deletions
diff --git a/chrome/browser/gtk/menu_bar_helper.cc b/chrome/browser/gtk/menu_bar_helper.cc
index 1e85475c..050760c 100644
--- a/chrome/browser/gtk/menu_bar_helper.cc
+++ b/chrome/browser/gtk/menu_bar_helper.cc
@@ -122,8 +122,8 @@ gboolean MenuBarHelper::OnMenuMotionNotify(GtkWidget* menu,
gint last_y = y;
if (!gtk_widget_translate_coordinates(
last_button, button, last_x, last_y, &x, &y)) {
- NOTREACHED();
- return FALSE;
+ // |button| may not be realized.
+ continue;
}
}