Fixed tab dragging which was broken on high DPI windows for scales other than 100%.
The tab dragging code uses the GetCursorPos API to determine the tab strip to be used to drag the tab into. This API returns values in pixel. We need to convert to DIP and vice versa wherever needed. Changes as below:- 1. window_finder_win.cc :- The cursor position after my changes now comes in as DIP. We need to convert to pixel as this class uses PtInRect and other APIs which need values in pixel. 2. screen_win.cc :- The GetCursorScreenPoint now returns values in DIP which is what is expected. These values are passed to views and other places which expect values in DIP. 3. apps_grid_view.cc :- Converted cursor position to DIP before passing it to the views code. Looked at other usages of this API. They seem to be in order. Thought about adding helpers for this for Windows. Decided against it as it is very hard to enforce given that it is a popular API. BUG=364969 R=sky@chromium.org, sky Review URL: https://codereview.chromium.org/256923002 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@266744 0039d316-1c4b-4281-b951-d872f2087c98
Showing
Please register or sign in to comment