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

Unified Diff: athena/wm/window_manager_impl.cc

Issue 513313003: Fix crash when using title drag on a window opened while split view is active (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
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: athena/wm/window_manager_impl.cc
diff --git a/athena/wm/window_manager_impl.cc b/athena/wm/window_manager_impl.cc
index 2b539612ea6b4ccb29957c61bc33fcae2226d33a..6e42c17a460a350d58e2ef20673ca947b0f2a640 100644
--- a/athena/wm/window_manager_impl.cc
+++ b/athena/wm/window_manager_impl.cc
@@ -101,14 +101,14 @@ void AthenaContainerLayoutManager::OnWindowAddedToLayout(aura::Window* child) {
aura::Window::Windows list = instance->window_list_provider_->GetWindowList();
if (std::find(list.begin(), list.end(), child) == list.end())
return;
- gfx::Size size;
if (instance->split_view_controller_->IsSplitViewModeActive()) {
- size = instance->split_view_controller_->left_window()->bounds().size();
+ instance->split_view_controller_->ReplaceWindow(
mfomitchev 2014/09/02 16:23:28 Hmm.. So normally the two windows shown in split v
mfomitchev 2014/09/02 16:23:28 Nit: A short comment explaining that ReplaceWindow
pkotwicz 2014/09/02 17:54:35 You are completely right. OnTitleDragCompleted() p
pkotwicz 2014/09/02 17:54:35 I think the comment in ReplaceWindow() is sufficie
mfomitchev 2014/09/02 18:09:46 Acknowledged.
+ instance->split_view_controller_->left_window(), child);
} else {
- size =
+ gfx::Size size =
gfx::Screen::GetNativeScreen()->GetPrimaryDisplay().work_area().size();
+ child->SetBounds(gfx::Rect(size));
}
- child->SetBounds(gfx::Rect(size));
}
void AthenaContainerLayoutManager::OnWillRemoveWindowFromLayout(

Powered by Google App Engine
This is Rietveld 408576698