Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(134)

Unified Diff: views/controls/menu/menu_host_gtk.cc

Issue 6693010: Use extension to show activation message. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: " Created 9 years, 9 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « content/browser/tab_contents/interstitial_page.cc ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: views/controls/menu/menu_host_gtk.cc
diff --git a/views/controls/menu/menu_host_gtk.cc b/views/controls/menu/menu_host_gtk.cc
index 9615e549b9ba991ca02c52cc8aa06e466354a01d..653f66c6c01e8964e97b565f5593e1ec8d3acf42 100644
--- a/views/controls/menu/menu_host_gtk.cc
+++ b/views/controls/menu/menu_host_gtk.cc
@@ -162,6 +162,13 @@ void MenuHostGtk::DoCapture() {
GdkGrabStatus keyboard_grab_status =
gdk_keyboard_grab(window_contents()->window, FALSE,
GDK_CURRENT_TIME);
+ if (pointer_grab_status == GDK_GRAB_NOT_VIEWABLE) {
zel 2011/03/15 18:39:45 does this file belong in this CL? does not seem re
+ DCHECK_EQ(GDK_GRAB_NOT_VIEWABLE, keyboard_grab_status);
+ GtkWidget* current_grab_window = gtk_grab_get_current();
+ if (current_grab_window)
+ gtk_grab_remove(current_grab_window);
+ return;
+ }
did_input_grab_ = pointer_grab_status == GDK_GRAB_SUCCESS &&
keyboard_grab_status == GDK_GRAB_SUCCESS;
@@ -173,7 +180,8 @@ void MenuHostGtk::DoCapture() {
did_input_grab_ = did_input_grab_ && xi2grab;
#endif
- DCHECK(did_input_grab_);
+ DCHECK_EQ(GDK_GRAB_SUCCESS, pointer_grab_status);
+ DCHECK_EQ(GDK_GRAB_SUCCESS, keyboard_grab_status);
// need keyboard grab.
}
« no previous file with comments | « content/browser/tab_contents/interstitial_page.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698