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

Unified Diff: ash/common/wm/window_state.cc

Issue 2072853002: Implement "pinned" mode in ash. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: address comments Created 4 years, 6 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
« no previous file with comments | « ash/common/wm/default_state.cc ('k') | ash/common/wm/workspace/workspace_layout_manager.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: ash/common/wm/window_state.cc
diff --git a/ash/common/wm/window_state.cc b/ash/common/wm/window_state.cc
index 8bfd8d4bd90416e644ed1b546b8627ec69ee0a14..900b6ccd3fcddbb794252d356f64795e87c1664c 100644
--- a/ash/common/wm/window_state.cc
+++ b/ash/common/wm/window_state.cc
@@ -186,7 +186,6 @@ void WindowState::Restore() {
}
void WindowState::DisableAlwaysOnTop(WmWindow* window_on_top) {
- DCHECK(window_on_top);
if (GetAlwaysOnTop()) {
// |window_| is hidden first to avoid canceling fullscreen mode when it is
// no longer always on top and gets added to default container. This avoids
@@ -200,7 +199,7 @@ void WindowState::DisableAlwaysOnTop(WmWindow* window_on_top) {
// Technically it is possible that a |window_| could make itself
// always_on_top really quickly. This is probably not a realistic case but
// check if the two windows are in the same container just in case.
- if (window_on_top->GetParent() == window_->GetParent())
+ if (window_on_top && window_on_top->GetParent() == window_->GetParent())
window_->GetParent()->StackChildAbove(window_on_top, window_);
if (visible)
window_->Show();
« no previous file with comments | « ash/common/wm/default_state.cc ('k') | ash/common/wm/workspace/workspace_layout_manager.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698