diff options
Diffstat (limited to 'chrome/browser/views/old_frames')
-rw-r--r-- | chrome/browser/views/old_frames/simple_vista_frame.cc | 2 | ||||
-rw-r--r-- | chrome/browser/views/old_frames/simple_xp_frame.cc | 2 | ||||
-rw-r--r-- | chrome/browser/views/old_frames/vista_frame.cc | 9 | ||||
-rw-r--r-- | chrome/browser/views/old_frames/vista_frame.h | 2 | ||||
-rw-r--r-- | chrome/browser/views/old_frames/xp_frame.cc | 12 | ||||
-rw-r--r-- | chrome/browser/views/old_frames/xp_frame.h | 2 |
6 files changed, 16 insertions, 13 deletions
diff --git a/chrome/browser/views/old_frames/simple_vista_frame.cc b/chrome/browser/views/old_frames/simple_vista_frame.cc index 3ec7260..a34cb88 100644 --- a/chrome/browser/views/old_frames/simple_vista_frame.cc +++ b/chrome/browser/views/old_frames/simple_vista_frame.cc @@ -145,7 +145,7 @@ void SimpleVistaFrame::OnNCLButtonDown(UINT flags, const CPoint& pt) { if (flags == HTSYSMENU) { POINT p = {0, 0}; ::ClientToScreen(*this, &p); - browser_->RunSimpleFrameMenu(p, *this); + browser_->RunSimpleFrameMenu(gfx::Point(p.x, p.y), *this); SetMsgHandled(true); } else { SetMsgHandled(false); diff --git a/chrome/browser/views/old_frames/simple_xp_frame.cc b/chrome/browser/views/old_frames/simple_xp_frame.cc index 8030a55..b2234e5 100644 --- a/chrome/browser/views/old_frames/simple_xp_frame.cc +++ b/chrome/browser/views/old_frames/simple_xp_frame.cc @@ -372,7 +372,7 @@ void SimpleXPFrame::ValidateThrobber() { } void SimpleXPFrame::RunMenu(const CPoint& pt, HWND hwnd) { - browser_->RunSimpleFrameMenu(pt, hwnd); + browser_->RunSimpleFrameMenu(gfx::Point(pt.x, pt.y), hwnd); } void SimpleXPFrame::ShowTabContents(TabContents* selected_contents) { diff --git a/chrome/browser/views/old_frames/vista_frame.cc b/chrome/browser/views/old_frames/vista_frame.cc index ed6cfe3..d671eee 100644 --- a/chrome/browser/views/old_frames/vista_frame.cc +++ b/chrome/browser/views/old_frames/vista_frame.cc @@ -1203,9 +1203,10 @@ HWND VistaFrame::GetHWND() const { return m_hWnd; } -void VistaFrame::PaintNow(const CRect& update_rect) { - if (!update_rect.IsRectNull() && IsVisible()) { - RedrawWindow(update_rect, +void VistaFrame::PaintNow(const gfx::Rect& update_rect) { + if (!update_rect.IsEmpty() && IsVisible()) { + RECT native_update_rect = update_rect.ToRECT(); + RedrawWindow(&native_update_rect, NULL, RDW_INVALIDATE | RDW_ALLCHILDREN | RDW_NOERASE); } @@ -1522,7 +1523,7 @@ void VistaFrame::ContinueDetachConstrainedWindowDrag(const gfx::Point& mouse_pt, // correct. (Otherwise parts of the tabstrip are clipped). CRect cr; GetClientRect(&cr); - PaintNow(cr); + PaintNow(gfx::Rect(cr)); // The user's mouse is already moving, and the left button is down, but we // need to start moving this frame, so we _post_ it a NCLBUTTONDOWN message diff --git a/chrome/browser/views/old_frames/vista_frame.h b/chrome/browser/views/old_frames/vista_frame.h index 10d654f..ff5de5c 100644 --- a/chrome/browser/views/old_frames/vista_frame.h +++ b/chrome/browser/views/old_frames/vista_frame.h @@ -193,7 +193,7 @@ class VistaFrame : public BrowserWindow, virtual void GetBounds(CRect *out, bool including_frame) const; virtual void MoveToFront(bool should_activate); virtual HWND GetHWND() const; - virtual void PaintNow(const CRect& update_rect); + virtual void PaintNow(const gfx::Rect& update_rect); virtual views::RootView* GetRootView(); virtual bool IsVisible(); virtual bool IsActive(); diff --git a/chrome/browser/views/old_frames/xp_frame.cc b/chrome/browser/views/old_frames/xp_frame.cc index 9ca65f1..5720782 100644 --- a/chrome/browser/views/old_frames/xp_frame.cc +++ b/chrome/browser/views/old_frames/xp_frame.cc @@ -1017,7 +1017,8 @@ void XPFrame::OnSize(UINT param, const CSize& size) { // We paint immediately during a resize because it will feel laggy otherwise. if (root_view_.NeedsPainting(false)) { - RedrawWindow(root_view_.GetScheduledPaintRect(), + RECT native_update_rect = root_view_.GetScheduledPaintRect().ToRECT(); + RedrawWindow(&native_update_rect, NULL, RDW_UPDATENOW | RDW_INVALIDATE | RDW_ALLCHILDREN); MessageLoopForUI::current()->PumpOutPendingPaintMessages(); @@ -1910,9 +1911,10 @@ HWND XPFrame::GetHWND() const { return m_hWnd; } -void XPFrame::PaintNow(const CRect& update_rect) { - if (!update_rect.IsRectNull() && IsVisible()) { - RedrawWindow(update_rect, +void XPFrame::PaintNow(const gfx::Rect& update_rect) { + if (!update_rect.IsEmpty() && IsVisible()) { + RECT native_update_rect = update_rect.ToRECT(); + RedrawWindow(&native_update_rect, NULL, // While we don't seem to need RDW_NOERASE here for correctness // (unlike Vista), I don't know whether it would hurt. @@ -2390,7 +2392,7 @@ void XPFrame::ContinueDetachConstrainedWindowDrag(const gfx::Point& mouse_pt, // correct. (Otherwise parts of the tabstrip are clipped). CRect cr; GetClientRect(&cr); - PaintNow(cr); + PaintNow(gfx::Rect(cr)); // The user's mouse is already moving, and the left button is down, but we // need to start moving this frame, so we _post_ it a NCLBUTTONDOWN message diff --git a/chrome/browser/views/old_frames/xp_frame.h b/chrome/browser/views/old_frames/xp_frame.h index 49a2c9f..c73b47d 100644 --- a/chrome/browser/views/old_frames/xp_frame.h +++ b/chrome/browser/views/old_frames/xp_frame.h @@ -160,7 +160,7 @@ class XPFrame : public BrowserWindow, virtual void GetBounds(CRect *out, bool including_frame) const; virtual void MoveToFront(bool should_activate); virtual HWND GetHWND() const; - virtual void PaintNow(const CRect& update_rect); + virtual void PaintNow(const gfx::Rect& update_rect); virtual views::RootView* GetRootView(); virtual bool IsVisible(); virtual bool IsActive(); |