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

Unified Diff: ash/wm/frame_painter.cc

Issue 10875070: Makes workspace 2 show an alternate background (system background) (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: More comments Created 8 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
« no previous file with comments | « ash/shell_window_ids.h ('k') | ash/wm/window_animations.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: ash/wm/frame_painter.cc
diff --git a/ash/wm/frame_painter.cc b/ash/wm/frame_painter.cc
index 8c7ac82959b0279cb306475e1060a5251b8e5ec5..11cf1fffabfef2e006f9505b1d13de011e96bd28 100644
--- a/ash/wm/frame_painter.cc
+++ b/ash/wm/frame_painter.cc
@@ -8,6 +8,7 @@
#include "ash/shell.h"
#include "ash/shell_window_ids.h"
#include "ash/wm/window_util.h"
+#include "ash/wm/workspace_controller.h"
#include "base/logging.h" // DCHECK
#include "grit/ui_resources.h"
#include "third_party/skia/include/core/SkCanvas.h"
@@ -593,7 +594,7 @@ bool FramePainter::UseSoloWindowHeader() {
if (!instances_)
return false; // Return value shouldn't matter.
- int window_count = 0;
+ aura::Window* window = NULL;
for (std::set<FramePainter*>::const_iterator it = instances_->begin();
it != instances_->end();
++it) {
@@ -601,12 +602,15 @@ bool FramePainter::UseSoloWindowHeader() {
// the existence of a layout manager gets additionally tested.
if (IsVisibleNormalWindow((*it)->window_) &&
(!(*it)->window_->GetProperty(ash::kConstrainedWindowKey))) {
- window_count++;
- if (window_count > 1)
+ if (window)
return false;
+ window = (*it)->window_;
}
}
- return window_count == 1;
+ // We don't use the translucent background when a window is maximized with
+ // workspace2 as otherwise the system background shows through the header.
+ return window && (!internal::WorkspaceController::IsWorkspace2Enabled() ||
+ !wm::IsWindowMaximized(window));
}
// static
« no previous file with comments | « ash/shell_window_ids.h ('k') | ash/wm/window_animations.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698