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

Side by Side Diff: ui/gfx/screen_win.cc

Issue 256923002: Fixed tab dragging which was broken on high DPI windows for scales other than 100%. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Rebased 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 unified diff | Download patch | Annotate | Revision Log
« no previous file with comments | « ui/app_list/views/apps_grid_view.cc ('k') | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2012 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 #include "ui/gfx/screen_win.h" 5 #include "ui/gfx/screen_win.h"
6 6
7 #include <windows.h> 7 #include <windows.h>
8 8
9 #include "base/hash.h" 9 #include "base/hash.h"
10 #include "base/logging.h" 10 #include "base/logging.h"
(...skipping 47 matching lines...) Expand 10 before | Expand all | Expand 10 after
58 ScreenWin::~ScreenWin() { 58 ScreenWin::~ScreenWin() {
59 } 59 }
60 60
61 bool ScreenWin::IsDIPEnabled() { 61 bool ScreenWin::IsDIPEnabled() {
62 return IsInHighDPIMode(); 62 return IsInHighDPIMode();
63 } 63 }
64 64
65 gfx::Point ScreenWin::GetCursorScreenPoint() { 65 gfx::Point ScreenWin::GetCursorScreenPoint() {
66 POINT pt; 66 POINT pt;
67 GetCursorPos(&pt); 67 GetCursorPos(&pt);
68 return gfx::Point(pt); 68 gfx::Point cursor_pos_pixels(pt);
69 return gfx::win::ScreenToDIPPoint(cursor_pos_pixels);
69 } 70 }
70 71
71 gfx::NativeWindow ScreenWin::GetWindowUnderCursor() { 72 gfx::NativeWindow ScreenWin::GetWindowUnderCursor() {
72 POINT cursor_loc; 73 POINT cursor_loc;
73 HWND hwnd = GetCursorPos(&cursor_loc) ? WindowFromPoint(cursor_loc) : NULL; 74 HWND hwnd = GetCursorPos(&cursor_loc) ? WindowFromPoint(cursor_loc) : NULL;
74 return GetNativeWindowFromHWND(hwnd); 75 return GetNativeWindowFromHWND(hwnd);
75 } 76 }
76 77
77 gfx::NativeWindow ScreenWin::GetWindowAtScreenPoint(const gfx::Point& point) { 78 gfx::NativeWindow ScreenWin::GetWindowAtScreenPoint(const gfx::Point& point) {
78 return GetNativeWindowFromHWND(WindowFromPoint(point.ToPOINT())); 79 return GetNativeWindowFromHWND(WindowFromPoint(point.ToPOINT()));
(...skipping 70 matching lines...) Expand 10 before | Expand all | Expand 10 after
149 NOTREACHED(); 150 NOTREACHED();
150 return NULL; 151 return NULL;
151 } 152 }
152 153
153 NativeWindow ScreenWin::GetNativeWindowFromHWND(HWND hwnd) const { 154 NativeWindow ScreenWin::GetNativeWindowFromHWND(HWND hwnd) const {
154 NOTREACHED(); 155 NOTREACHED();
155 return NULL; 156 return NULL;
156 } 157 }
157 158
158 } // namespace gfx 159 } // namespace gfx
OLDNEW
« no previous file with comments | « ui/app_list/views/apps_grid_view.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698