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

Unified Diff: ash/wm/frame_painter.cc

Issue 10826085: Fixing problems with constrained windows (i.e. print preview) (Closed) Base URL: http://git.chromium.org/chromium/src.git@master
Patch Set: Created 8 years, 5 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 | « no previous file | chrome/browser/ui/views/constrained_window_views.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 2c0a43c30a97e3ac3bde5d62c604c4b4a85a9550..b24aa15ca4cff1b3849a88c08654a0d2cc294c0e 100644
--- a/ash/wm/frame_painter.cc
+++ b/ash/wm/frame_painter.cc
@@ -609,7 +609,11 @@ bool FramePainter::UseSoloWindowHeader() {
for (std::set<FramePainter*>::const_iterator it = instances_->begin();
it != instances_->end();
++it) {
- if (IsVisibleNormalWindow((*it)->window_)) {
+ // The window needs to be a 'normal window'. To exclude constrained windows
+ // the existence of a layout manager gets additionally tested.
+ if (IsVisibleNormalWindow((*it)->window_) &&
+ (!(*it)->window_->parent() ||
+ (*it)->window_->parent()->layout_manager())) {
Ben Goodger (Google) 2012/07/31 17:59:35 hrm... this seems like it could be brittle, for ex
Mr4D (OOO till 08-26) 2012/07/31 19:37:26 I added a property flag which seems to be a better
window_count++;
if (window_count > 1)
return false;
« no previous file with comments | « no previous file | chrome/browser/ui/views/constrained_window_views.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698