DescriptionFixed 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
Committed: https://src.chromium.org/viewvc/chrome?view=rev&revision=266744
Patch Set 1 #
Total comments: 2
Patch Set 2 : Code review comments #Patch Set 3 : Rebased #
Messages
Total messages: 13 (0 generated)
|