diff options
-rw-r--r-- | chrome/browser/views/frame/browser_frame_win.cc | 14 |
1 files changed, 14 insertions, 0 deletions
diff --git a/chrome/browser/views/frame/browser_frame_win.cc b/chrome/browser/views/frame/browser_frame_win.cc index 7ddd92f..3a9d7d6 100644 --- a/chrome/browser/views/frame/browser_frame_win.cc +++ b/chrome/browser/views/frame/browser_frame_win.cc @@ -239,6 +239,20 @@ void BrowserFrameWin::OnWindowPosChanged(WINDOWPOS* window_pos) { // Let the default window procedure handle - IMPORTANT! WindowWin::OnWindowPosChanged(window_pos); + + // Windows lies to us about the position of the minimize button before a + // window is visible. We use this position to place the OTR avatar in RTL + // mode, so when the window is shown, we need to re-layout and schedule a + // paint for the non-client frame view so that the icon top has the correct + // position when the window becomes visible. This fixes bugs where the icon + // appears to overlay the minimize button. + // 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(); + } } ThemeProvider* BrowserFrameWin::GetThemeProvider() const { |