Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(699)

Unified Diff: chrome/browser/ui/views/frame/glass_browser_frame_view.cc

Issue 305623004: Calculate non client hittest values by converting the corresponding system metrics returned via the… (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 6 years, 7 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « no previous file | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/browser/ui/views/frame/glass_browser_frame_view.cc
diff --git a/chrome/browser/ui/views/frame/glass_browser_frame_view.cc b/chrome/browser/ui/views/frame/glass_browser_frame_view.cc
index f548a01d885457a0ac855343bd554c05a81279d8..1402b157bcf56ab927d9f5585652ac2faa61d94f 100644
--- a/chrome/browser/ui/views/frame/glass_browser_frame_view.cc
+++ b/chrome/browser/ui/views/frame/glass_browser_frame_view.cc
@@ -235,9 +235,10 @@ int GlassBrowserFrameView::NonClientHitTest(const gfx::Point& point) {
// See if we're in the sysmenu region. We still have to check the tabstrip
// first so that clicks in a tab don't get treated as sysmenu clicks.
int nonclient_border_thickness = NonClientBorderThickness();
- if (gfx::Rect(nonclient_border_thickness, GetSystemMetrics(SM_CXSIZEFRAME),
- GetSystemMetrics(SM_CXSMICON),
- GetSystemMetrics(SM_CYSMICON)).Contains(point))
+ if (gfx::Rect(nonclient_border_thickness,
+ gfx::win::GetSystemMetricsInDIP(SM_CXSIZEFRAME),
+ gfx::win::GetSystemMetricsInDIP(SM_CXSMICON),
+ gfx::win::GetSystemMetricsInDIP(SM_CYSMICON)).Contains(point))
return (frame_component == HTCLIENT) ? HTCLIENT : HTSYSMENU;
if (frame_component != HTNOWHERE)
@@ -297,7 +298,7 @@ void GlassBrowserFrameView::ButtonPressed(views::Button* sender,
int GlassBrowserFrameView::FrameBorderThickness() const {
return (frame()->IsMaximized() || frame()->IsFullscreen()) ?
- 0 : GetSystemMetrics(SM_CXSIZEFRAME);
+ 0 : gfx::win::GetSystemMetricsInDIP(SM_CXSIZEFRAME);
}
int GlassBrowserFrameView::NonClientBorderThickness() const {
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698