Index: ui/views/widget/desktop_aura/desktop_drag_drop_client_aurax11.cc |
diff --git a/ui/views/widget/desktop_aura/desktop_drag_drop_client_aurax11.cc b/ui/views/widget/desktop_aura/desktop_drag_drop_client_aurax11.cc |
index b64de5966581d476e50cd1345c283bd4021f24a3..5dbc2b5d6dd652fc228ac7b09e6da8735a300ae3 100644 |
--- a/ui/views/widget/desktop_aura/desktop_drag_drop_client_aurax11.cc |
+++ b/ui/views/widget/desktop_aura/desktop_drag_drop_client_aurax11.cc |
@@ -10,6 +10,7 @@ |
#include "base/lazy_instance.h" |
#include "base/message_loop/message_loop.h" |
#include "third_party/skia/include/core/SkBitmap.h" |
+#include "ui/aura/client/capture_client.h" |
#include "ui/aura/window.h" |
#include "ui/aura/window_tree_host.h" |
#include "ui/base/clipboard/clipboard.h" |
@@ -640,6 +641,12 @@ int DesktopDragDropClientAuraX11::StartDragAndDrop( |
drag_widget_offset_ = source_provider_->GetDragImageOffset(); |
} |
+ // Chrome expects starting drag and drop to release capture. |
+ aura::Window* capture_window = |
+ aura::client::GetCaptureClient(root_window)->GetGlobalCaptureWindow(); |
+ if (capture_window) |
+ capture_window->ReleaseCapture(); |
+ |
// It is possible for the DesktopWindowTreeHostX11 to be destroyed during the |
// move loop, which would also destroy this drag-client. So keep track of |
// whether it is alive after the drag ends. |