diff options
-rw-r--r-- | chrome/browser/views/frame/browser_frame_win.cc | 18 | ||||
-rw-r--r-- | chrome/browser/views/frame/browser_frame_win.h | 1 |
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; |