Chromium Code Reviews| 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 741a77fa8638741377a44a8b4dbde868e5839354..a2f456df427aa5f1d337723d93be823fed21578a 100644 |
| --- a/chrome/browser/ui/views/tabs/tab_drag_controller.cc |
| +++ b/chrome/browser/ui/views/tabs/tab_drag_controller.cc |
| @@ -694,9 +694,12 @@ TabDragController::DragBrowserToNewTabStrip( |
| // that to effect the position of any windows. |
| SetWindowPositionManaged(browser_widget->GetNativeView(), false); |
| +#if !defined(OS_LINUX) |
|
Elliot Glaysher
2014/02/26 20:33:17
Isn't this code used on chromeos, too?
varkha
2014/02/26 20:59:35
It is, but I did not see any visual impact from sk
|
| // EndMoveLoop is going to snap the window back to its original location. |
| - // Hide it so users don't see this. |
| + // Hide it so users don't see this. Hiding a window in Linux aura causes |
| + // it to lose capture so skip it. |
| browser_widget->Hide(); |
|
varkha
2014/02/26 20:30:18
Not calling Hide on Linux seems to be lesser evil
|
| +#endif |
| browser_widget->EndMoveLoop(); |
| // Ideally we would always swap the tabs now, but on non-ash it seems that |
| @@ -1211,15 +1214,15 @@ void TabDragController::RunMoveLoop(const gfx::Vector2d& drag_offset) { |
| if (end_run_loop_behavior_ == END_RUN_LOOP_CONTINUE_DRAGGING) { |
| end_run_loop_behavior_ = END_RUN_LOOP_STOP_DRAGGING; |
| if (tab_strip_to_attach_to_after_exit_) { |
| + tab_strip_to_attach_to_after_exit_->GetWidget()->Activate(); |
|
varkha
2014/02/26 20:30:18
Activating before calling Detach (which may close
Elliot Glaysher
2014/02/26 20:33:17
What's the effect on Windows here?
varkha
2014/02/26 20:59:35
I didn't have a chance to test this on Windows yet
|
| + // Activate may trigger a focus loss, destroying us. |
| + if (!ref) |
| + return; |
| gfx::Point point_in_screen(GetCursorScreenPoint()); |
| Detach(DONT_RELEASE_CAPTURE); |
| Attach(tab_strip_to_attach_to_after_exit_, point_in_screen); |
| // Move the tabs into position. |
| MoveAttached(point_in_screen); |
| - attached_tabstrip_->GetWidget()->Activate(); |
| - // Activate may trigger a focus loss, destroying us. |
| - if (!ref) |
| - return; |
| tab_strip_to_attach_to_after_exit_ = NULL; |
| } |
| DCHECK(attached_tabstrip_); |