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..e79cb88dd04cdd99f029bc501959ae3eb704e914 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" |
@@ -1498,6 +1499,10 @@ void TabDragController::RevertDragAt(size_t drag_index) { |
void TabDragController::CompleteDrag() { |
DCHECK(started_drag_); |
+ // 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 (attached_tabstrip_) { |
if (is_dragging_new_browser_ || did_restore_window_) { |
if (IsDockedOrSnapped(attached_tabstrip_)) { |
@@ -1750,6 +1755,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); |