summaryrefslogtreecommitdiffstats
path: root/chrome/browser/views
diff options
context:
space:
mode:
authorpkasting@chromium.org <pkasting@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2010-08-17 17:40:35 +0000
committerpkasting@chromium.org <pkasting@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2010-08-17 17:40:35 +0000
commitd036742a1b302ccc2642026a8f61d6113a397e01 (patch)
tree3099cc04c9be36f968e43c57f33aafd29a274a38 /chrome/browser/views
parentf0ea49bb8d3280a52121666d14cc01ae1e0991e5 (diff)
downloadchromium_src-d036742a1b302ccc2642026a8f61d6113a397e01.zip
chromium_src-d036742a1b302ccc2642026a8f61d6113a397e01.tar.gz
chromium_src-d036742a1b302ccc2642026a8f61d6113a397e01.tar.bz2
Turns out this code I'd removed is still necessary for the RTL OTR avatar to not look broken.
TBR=ben BUG=none TEST=Run in Aero with --lang=he, hit ctrl-shift-n, Incognito image should not be broken in two Review URL: http://codereview.chromium.org/3117016 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@56379 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'chrome/browser/views')
-rw-r--r--chrome/browser/views/frame/browser_frame_win.cc14
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 0a4212c..d018712 100644
--- a/chrome/browser/views/frame/browser_frame_win.cc
+++ b/chrome/browser/views/frame/browser_frame_win.cc
@@ -224,6 +224,20 @@ LRESULT BrowserFrameWin::OnNCHitTest(const CPoint& pt) {
void BrowserFrameWin::OnWindowPosChanged(WINDOWPOS* window_pos) {
WindowWin::OnWindowPosChanged(window_pos);
UpdateDWMFrame();
+
+ // 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 {