diff options
author | sky@chromium.org <sky@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2012-09-04 22:41:52 +0000 |
---|---|---|
committer | sky@chromium.org <sky@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2012-09-04 22:41:52 +0000 |
commit | e65507c829ffaa26189f42c33a333609be1fbb3d (patch) | |
tree | 817d2320f96b1dc96946bfd39a4bf161ca8714b4 | |
parent | eb93ad613ebcd4484e7cd032834776d410eb30b3 (diff) | |
download | chromium_src-e65507c829ffaa26189f42c33a333609be1fbb3d.zip chromium_src-e65507c829ffaa26189f42c33a333609be1fbb3d.tar.gz chromium_src-e65507c829ffaa26189f42c33a333609be1fbb3d.tar.bz2 |
Fixes bug where dragging a tab from one display to the other wouldn't
attach to the target tabstrip correctly. This is because the code to
find the window to attach to ended up always seeing the phantom
window.
BUG=136919
TEST=none
R=oshima@chromium.org
Review URL: https://chromiumcodereview.appspot.com/10905079
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@154831 0039d316-1c4b-4281-b951-d872f2087c98
-rw-r--r-- | ash/shell_window_ids.h | 5 | ||||
-rw-r--r-- | ash/wm/workspace/phantom_window_controller.cc | 1 | ||||
-rw-r--r-- | chrome/browser/ui/ash/tabs/dock_info_ash.cc | 4 |
3 files changed, 10 insertions, 0 deletions
diff --git a/ash/shell_window_ids.h b/ash/shell_window_ids.h index 7f0e1ca..347f3d8 100644 --- a/ash/shell_window_ids.h +++ b/ash/shell_window_ids.h @@ -9,6 +9,8 @@ namespace ash { +// TODO: we're using this in random places outside of ash, it shouldn't be in +// internal. namespace internal { // A higher-level container that holds all of the containers stacked below @@ -98,6 +100,9 @@ const int kShellWindowId_SettingBubbleContainer = 20; // region selector for partial screenshots. const int kShellWindowId_OverlayContainer = 21; +// ID of the window created by PhantomWindowController. +const int kShellWindowId_PhantomWindow = 22; + } // namespace internal } // namespace ash diff --git a/ash/wm/workspace/phantom_window_controller.cc b/ash/wm/workspace/phantom_window_controller.cc index 7be5fb2..95cfb9f 100644 --- a/ash/wm/workspace/phantom_window_controller.cc +++ b/ash/wm/workspace/phantom_window_controller.cc @@ -166,6 +166,7 @@ void PhantomWindowController::CreatePhantomWidget(const gfx::Rect& bounds, phantom_widget_->Init(params); phantom_widget_->SetVisibilityChangedAnimationsEnabled(false); phantom_widget_->GetNativeWindow()->SetName("PhantomWindow"); + phantom_widget_->GetNativeWindow()->set_id(kShellWindowId_PhantomWindow); if (style_ == STYLE_SHADOW) { views::View* content_view = new views::View; content_view->set_background( diff --git a/chrome/browser/ui/ash/tabs/dock_info_ash.cc b/chrome/browser/ui/ash/tabs/dock_info_ash.cc index 4f1b649..da981df2 100644 --- a/chrome/browser/ui/ash/tabs/dock_info_ash.cc +++ b/chrome/browser/ui/ash/tabs/dock_info_ash.cc @@ -4,6 +4,7 @@ #include "chrome/browser/ui/tabs/dock_info.h" +#include "ash/shell_window_ids.h" #include "ash/wm/coordinate_conversion.h" #include "ui/aura/client/screen_position_client.h" #include "ui/aura/root_window.h" @@ -24,6 +25,9 @@ aura::Window* GetLocalProcessWindowAtPointImpl( if (!window->IsVisible()) return NULL; + if (window->id() == ash::internal::kShellWindowId_PhantomWindow) + return NULL; + if (window->layer()->type() == ui::LAYER_TEXTURED) { gfx::Point window_point(screen_point); aura::client::GetScreenPositionClient(window->GetRootWindow())-> |