Index: chrome/browser/ui/views/tabs/tab_drag_controller.cc |
diff --git a/chrome/browser/ui/views/tabs/tab_drag_controller.cc b/chrome/browser/ui/views/tabs/tab_drag_controller.cc |
index e604c7c47692ca25ace806a1355c3f0626e444db..b1b8a310541a2b509788fc972cbb6535acade6c6 100644 |
--- a/chrome/browser/ui/views/tabs/tab_drag_controller.cc |
+++ b/chrome/browser/ui/views/tabs/tab_drag_controller.cc |
@@ -29,6 +29,7 @@ |
#include "content/public/browser/user_metrics.h" |
#include "content/public/browser/web_contents.h" |
#include "extensions/browser/extension_function_dispatcher.h" |
+#include "ui/aura/window_tree_host.h" |
#include "ui/events/event_constants.h" |
#include "ui/events/gestures/gesture_recognizer.h" |
#include "ui/gfx/geometry/point_conversions.h" |
@@ -1499,6 +1500,13 @@ void TabDragController::CompleteDrag() { |
DCHECK(started_drag_); |
if (attached_tabstrip_) { |
+ if (is_dragging_new_browser_) { |
+ // Remap the window without override-redirect, so that the window manager |
+ // will pick it up (we use an unmanaged window while dragging). |
+ GetAttachedBrowserWidget()->GetNativeView()->GetHost()-> |
+ RemapAsNormalWindow(); |
+ } |
+ |
if (is_dragging_new_browser_ || did_restore_window_) { |
if (IsDockedOrSnapped(attached_tabstrip_)) { |
was_source_maximized_ = false; |
@@ -1750,6 +1758,7 @@ Browser* TabDragController::CreateBrowserForDrag( |
profile, |
host_desktop_type_); |
create_params.initial_bounds = new_bounds; |
+ create_params.is_being_dragged = true; |
Browser* browser = new Browser(create_params); |
is_dragging_new_browser_ = true; |
SetWindowPositionManaged(browser->window()->GetNativeWindow(), false); |