Chromium Code Reviews| Index: ui/views/widget/widget.cc |
| diff --git a/ui/views/widget/widget.cc b/ui/views/widget/widget.cc |
| index 17675e73c44d8c90681eabff93600f6de4b5d1d4..f07b1eb99f6cbb1c30931fd81250811e7ae5d383 100644 |
| --- a/ui/views/widget/widget.cc |
| +++ b/ui/views/widget/widget.cc |
| @@ -781,13 +781,9 @@ void Widget::RunShellDrag(View* view, |
| if (!widget_deletion_observer.IsWidgetAlive()) |
| return; |
| - // If the view is removed during the drag operation, dragged_view_ is set to |
| - // NULL. |
| - if (view && dragged_view_ == view) { |
| - dragged_view_ = NULL; |
| - view->OnDragDone(); |
| - } |
| - OnDragComplete(); |
| +#if !defined(OS_MACOSX) |
| + DraggingEnded(view); |
|
tapted
2016/05/26 12:31:42
Hm - x11 spins its own runloop to "force" it to be
|
| +#endif |
| } |
| void Widget::SchedulePaintInRect(const gfx::Rect& rect) { |
| @@ -1367,6 +1363,16 @@ void Widget::DestroyRootView() { |
| void Widget::OnDragWillStart() {} |
| +void Widget::DraggingEnded(View* view) { |
| + // If the view is removed during the drag operation, dragged_view_ is set to |
| + // NULL. |
| + if (view && dragged_view_ == view) { |
| + dragged_view_ = NULL; |
| + view->OnDragDone(); |
| + } |
| + OnDragComplete(); |
| +} |
| + |
| void Widget::OnDragComplete() {} |
| //////////////////////////////////////////////////////////////////////////////// |