summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorestade@chromium.org <estade@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2010-01-20 02:09:10 +0000
committerestade@chromium.org <estade@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2010-01-20 02:09:10 +0000
commit330c630ec1bf6451d03dcee3bc66fa7a6f1fe4a6 (patch)
tree0875ea4308011825c815802d402cedd44775aff4
parent201d8cb9e4fd1d6b8bb2c86fd8a641b28df0310a (diff)
downloadchromium_src-330c630ec1bf6451d03dcee3bc66fa7a6f1fe4a6.zip
chromium_src-330c630ec1bf6451d03dcee3bc66fa7a6f1fe4a6.tar.gz
chromium_src-330c630ec1bf6451d03dcee3bc66fa7a6f1fe4a6.tar.bz2
Gtk: don't crash when a dragged tab gets deleted.
Unfortunately, the more correct seeming gtk_grab_remove(gtk_grab_get_current()); doesn't seem to work. BUG=30592 TEST=see bug Review URL: http://codereview.chromium.org/542139 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@36598 0039d316-1c4b-4281-b951-d872f2087c98
-rw-r--r--chrome/browser/gtk/tabs/tab_gtk.cc8
1 files changed, 8 insertions, 0 deletions
diff --git a/chrome/browser/gtk/tabs/tab_gtk.cc b/chrome/browser/gtk/tabs/tab_gtk.cc
index dad8918..abb05e0 100644
--- a/chrome/browser/gtk/tabs/tab_gtk.cc
+++ b/chrome/browser/gtk/tabs/tab_gtk.cc
@@ -163,6 +163,14 @@ TabGtk::TabGtk(TabDelegate* delegate)
}
TabGtk::~TabGtk() {
+ if (drag_widget_) {
+ // Shadow the drag grab so the grab terminates. We could do this using any
+ // widget, |drag_widget_| is just convenient.
+ gtk_grab_add(drag_widget_);
+ gtk_grab_remove(drag_widget_);
+ DestroyDragWidget();
+ }
+
if (menu_controller_.get()) {
// The menu is showing. Close the menu.
menu_controller_->Cancel();