summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorpkasting@chromium.org <pkasting@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2009-01-31 02:22:13 +0000
committerpkasting@chromium.org <pkasting@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2009-01-31 02:22:13 +0000
commit52b1be4d7d255109aaf78b4db40bc5a4a2be9f46 (patch)
treecc09ff70b2ade46d1b5e276b4a3e95dff6390427
parenta15e357e681110acb2be542e5fbaabb8cfc75782 (diff)
downloadchromium_src-52b1be4d7d255109aaf78b4db40bc5a4a2be9f46.zip
chromium_src-52b1be4d7d255109aaf78b4db40bc5a4a2be9f46.tar.gz
chromium_src-52b1be4d7d255109aaf78b4db40bc5a4a2be9f46.tar.bz2
Fix Aero Basic (i.e. non-glass) maximized mode drawing. This old hack was interfering with my new code that should do things at least somewhat more correctly.
BUG=5054 Review URL: http://codereview.chromium.org/19728 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@9009 0039d316-1c4b-4281-b951-d872f2087c98
-rw-r--r--chrome/views/custom_frame_window.cc46
1 files changed, 0 insertions, 46 deletions
diff --git a/chrome/views/custom_frame_window.cc b/chrome/views/custom_frame_window.cc
index a97b921..e80c384 100644
--- a/chrome/views/custom_frame_window.cc
+++ b/chrome/views/custom_frame_window.cc
@@ -858,45 +858,6 @@ void DefaultNonClientView::InitClass() {
}
///////////////////////////////////////////////////////////////////////////////
-// NonClientViewLayout
-
-class NonClientViewLayout : public LayoutManager {
- public:
- // The size of the default window border and padding used by Windows Vista
- // with DWM disabled when clipping the window for maximized display.
- // TODO(beng): figure out how to get this programmatically, since it varies
- // with adjustments to the Windows Border/Padding setting.
- static const int kBorderAndPadding = 8;
-
- NonClientViewLayout(View* child, Window* window)
- : child_(child),
- window_(window) {
- }
- virtual ~NonClientViewLayout() {}
-
- // Overridden from LayoutManager:
- virtual void Layout(View* host) {
- int horizontal_border_width =
- window_->IsMaximized() ? kBorderAndPadding : 0;
- int vertical_border_height =
- window_->IsMaximized() ? kBorderAndPadding : 0;
-
- child_->SetBounds(horizontal_border_width, vertical_border_height,
- host->width() - (2 * horizontal_border_width),
- host->height() - (2 * vertical_border_height));
- }
- virtual gfx::Size GetPreferredSize(View* host) {
- return child_->GetPreferredSize();
- }
-
- private:
- View* child_;
- Window* window_;
-
- DISALLOW_COPY_AND_ASSIGN(NonClientViewLayout);
-};
-
-///////////////////////////////////////////////////////////////////////////////
// CustomFrameWindow, public:
CustomFrameWindow::CustomFrameWindow(WindowDelegate* window_delegate)
@@ -929,13 +890,6 @@ void CustomFrameWindow::Init(HWND parent, const gfx::Rect& bounds) {
non_client_view_ = new DefaultNonClientView(this);
Window::Init(parent, bounds);
- // Windows Vista non-Aero-glass does wacky things with maximized windows that
- // require a special layout manager to compensate for.
- if (win_util::GetWinVersion() >= win_util::WINVERSION_VISTA) {
- GetRootView()->SetLayoutManager(
- new NonClientViewLayout(non_client_view_, this));
- }
-
ResetWindowRegion();
}