summaryrefslogtreecommitdiffstats
path: root/chrome/browser/views
diff options
context:
space:
mode:
authorben@chromium.org <ben@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2009-07-07 01:56:51 +0000
committerben@chromium.org <ben@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2009-07-07 01:56:51 +0000
commit40fd10a28d79a944f7c2cd8de62d4c3d663a9782 (patch)
treebfae1afc2ea9e1e3f7c6e07736c5a69c6b022969 /chrome/browser/views
parent6a9c78e51aac5935aeb22b335a1d63a763bc1d5b (diff)
downloadchromium_src-40fd10a28d79a944f7c2cd8de62d4c3d663a9782.zip
chromium_src-40fd10a28d79a944f7c2cd8de62d4c3d663a9782.tar.gz
chromium_src-40fd10a28d79a944f7c2cd8de62d4c3d663a9782.tar.bz2
Fix issue once and for all where distributor logo overlays window controls. Need to force a layout and schedule a paint when a window is made visible.
http://crbug.com/15520 TEST=see bug. Review URL: http://codereview.chromium.org/155111 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@20006 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'chrome/browser/views')
-rw-r--r--chrome/browser/views/frame/browser_frame_win.cc18
-rw-r--r--chrome/browser/views/frame/browser_frame_win.h1
2 files changed, 19 insertions, 0 deletions
diff --git a/chrome/browser/views/frame/browser_frame_win.cc b/chrome/browser/views/frame/browser_frame_win.cc
index 5e311c7..1d39820 100644
--- a/chrome/browser/views/frame/browser_frame_win.cc
+++ b/chrome/browser/views/frame/browser_frame_win.cc
@@ -227,6 +227,24 @@ LRESULT BrowserFrameWin::OnNCHitTest(const CPoint& pt) {
return WindowWin::OnNCHitTest(pt);
}
+void BrowserFrameWin::OnWindowPosChanged(WINDOWPOS* window_pos) {
+ // Windows lies to us about the position of the minimize button before a
+ // window is visible. We use the position of the minimize button to place the
+ // distributor logo in official builds. When the window is shown, we need to
+ // re-layout and schedule a paint for the non-client frame view so that the
+ // distributor logo has the correct position when the window becomes visible.
+ // This fixes bugs where the distributor logo appears to overlay the minimize
+ // button. http://crbug.com/15520
+ // Note that we will call Layout every time SetWindowPos is called with
+ // SWP_SHOWWINDOW, however callers typically are careful about not specifying
+ // this flag unless necessary to avoid flicker.
+ if (window_pos->flags & SWP_SHOWWINDOW) {
+ GetNonClientView()->Layout();
+ GetNonClientView()->SchedulePaint();
+ }
+ WindowWin::OnWindowPosChanged(window_pos);
+}
+
///////////////////////////////////////////////////////////////////////////////
// BrowserFrame, views::CustomFrameWindow overrides:
diff --git a/chrome/browser/views/frame/browser_frame_win.h b/chrome/browser/views/frame/browser_frame_win.h
index 64dc1c6..47b0afa 100644
--- a/chrome/browser/views/frame/browser_frame_win.h
+++ b/chrome/browser/views/frame/browser_frame_win.h
@@ -63,6 +63,7 @@ class BrowserFrameWin : public BrowserFrame, public views::WindowWin {
virtual LRESULT OnNCActivate(BOOL active);
virtual LRESULT OnNCCalcSize(BOOL mode, LPARAM l_param);
virtual LRESULT OnNCHitTest(const CPoint& pt);
+ virtual void OnWindowPosChanged(WINDOWPOS* window_pos);
// Overridden from views::Window:
virtual int GetShowState() const;