Use gfx::Rect::ToRECT

This commit is contained in:
Kevin Sawicki 2016-08-09 08:42:57 -07:00
parent 5f2a13d01b
commit 2802d2f3f9

View file

@ -168,13 +168,8 @@ bool TaskbarHost::SetThumbnailClip(HWND window, const gfx::Rect& region) {
if (region.IsEmpty()) {
return SUCCEEDED(taskbar_->SetThumbnailClip(window, NULL));
} else {
gfx::Rect screen_rect = display::win::ScreenWin::DIPToScreenRect(window,
region);
RECT rect;
rect.left = screen_rect.x();
rect.right = screen_rect.right();
rect.top = screen_rect.y();
rect.bottom = screen_rect.bottom();
RECT rect = display::win::ScreenWin::DIPToScreenRect(window, region)
.ToRECT();
return SUCCEEDED(taskbar_->SetThumbnailClip(window, &rect));
}
}