Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(459)

Unified Diff: ui/views/widget/desktop_aura/desktop_drag_drop_client_aurax11.cc

Issue 455553003: Do not release capture when starting a move loop on Desktop Linux (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 6 years, 4 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
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.
« no previous file with comments | « chrome/browser/ui/views/tabs/tab_drag_controller.cc ('k') | ui/views/widget/desktop_aura/desktop_window_tree_host_x11.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698