Index: chrome/browser/renderer_host/render_widget_host_view_gtk.cc |
=================================================================== |
--- chrome/browser/renderer_host/render_widget_host_view_gtk.cc (revision 21109) |
+++ chrome/browser/renderer_host/render_widget_host_view_gtk.cc (working copy) |
@@ -421,8 +421,13 @@ |
// and webkit will manage our destruction. |
if (activatable()) { |
// Grab all input for the app. If a click lands outside the bounds of the |
- // popup, WebKit will notice and destroy us. |
+ // popup, WebKit will notice and destroy us. Before doing this we need |
+ // to ensure that the the popup is added to the browser's window group, |
+ // to allow for the grabs to work correctly. |
+ gtk_window_group_add_window(gtk_window_get_group( |
+ GTK_WINDOW(gtk_widget_get_toplevel(parent_))), GTK_WINDOW(popup)); |
gtk_grab_add(view_.get()); |
+ |
// Now grab all of X's input. |
gdk_pointer_grab( |
parent_->window, |