Skip to content

Commit

Permalink
Gtk: don't crash when a dragged tab gets deleted.
Browse files Browse the repository at this point in the history
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
  • Loading branch information
estade@chromium.org committed Jan 20, 2010
1 parent 201d8cb commit 330c630
Showing 1 changed file with 8 additions and 0 deletions.
8 changes: 8 additions & 0 deletions chrome/browser/gtk/tabs/tab_gtk.cc
Original file line number Diff line number Diff line change
Expand Up @@ -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();
Expand Down

0 comments on commit 330c630

Please sign in to comment.