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

Issue 922293002: linux/x11: Fix event dispatch in menus in High DPI. (Closed)

Created:
5 years, 10 months ago by sadrul
Modified:
5 years, 10 months ago
Reviewers:
pkotwicz
CC:
chromium-reviews, tfarina, tdanderson+views_chromium.org
Base URL:
https://chromium.googlesource.com/chromium/src.git@master
Target Ref:
refs/pending/heads/master
Project:
chromium
Visibility:
Public.

Description

linux/x11: Fix event dispatch in menus in High DPI. In 'normal' setting (i.e. non-HighDPI), the coordinate space of a DesktopWindowTreeHostX11 and the aura::Window it hosts is the same. So when converting an event's location from one host's coordinate space to another host's coordinate space, it is sufficient to use the aura::Window API to convert the location between the hosts' aura::Window. However, in HighDPI, the coordinate space of the host is different from that of its aura::Window, and using aura::Window API to do the coordinate conversion results in incorrect location. Use a simpler method to do the conversion to avoid this. BUG=400837 R=pkotwicz@chromium.org Committed: https://chromium.googlesource.com/chromium/src/+/c4a76234ea701f22a870231d1b900a367693acc6

Patch Set 1 #

Total comments: 9

Patch Set 2 : . #

Unified diffs Side-by-side diffs Delta from patch set Stats (+166 lines, -2 lines) Patch
M ui/views/widget/desktop_aura/desktop_window_tree_host_x11.h View 1 2 chunks +6 lines, -0 lines 0 comments Download
M ui/views/widget/desktop_aura/desktop_window_tree_host_x11.cc View 1 2 chunks +18 lines, -2 lines 0 comments Download
M ui/views/widget/desktop_aura/desktop_window_tree_host_x11_unittest.cc View 3 chunks +142 lines, -0 lines 0 comments Download

Messages

Total messages: 8 (2 generated)
sadrul
5 years, 10 months ago (2015-02-13 17:18:51 UTC) #2
pkotwicz
LGTM with nits https://codereview.chromium.org/922293002/diff/1/ui/views/widget/desktop_aura/desktop_window_tree_host_x11.cc File ui/views/widget/desktop_aura/desktop_window_tree_host_x11.cc (right): https://codereview.chromium.org/922293002/diff/1/ui/views/widget/desktop_aura/desktop_window_tree_host_x11.cc#newcode1450 ui/views/widget/desktop_aura/desktop_window_tree_host_x11.cc:1450: void DesktopWindowTreeHostX11::UpdateEventLocationForDifferentHost( Nit: I think that ...
5 years, 10 months ago (2015-02-13 20:15:35 UTC) #3
sadrul
https://codereview.chromium.org/922293002/diff/1/ui/views/widget/desktop_aura/desktop_window_tree_host_x11.cc File ui/views/widget/desktop_aura/desktop_window_tree_host_x11.cc (right): https://codereview.chromium.org/922293002/diff/1/ui/views/widget/desktop_aura/desktop_window_tree_host_x11.cc#newcode1450 ui/views/widget/desktop_aura/desktop_window_tree_host_x11.cc:1450: void DesktopWindowTreeHostX11::UpdateEventLocationForDifferentHost( On 2015/02/13 20:15:35, pkotwicz wrote: > Nit: ...
5 years, 10 months ago (2015-02-13 20:27:36 UTC) #5
sadrul
https://codereview.chromium.org/922293002/diff/1/ui/views/widget/desktop_aura/desktop_window_tree_host_x11.cc File ui/views/widget/desktop_aura/desktop_window_tree_host_x11.cc (right): https://codereview.chromium.org/922293002/diff/1/ui/views/widget/desktop_aura/desktop_window_tree_host_x11.cc#newcode1462 ui/views/widget/desktop_aura/desktop_window_tree_host_x11.cc:1462: gfx::Point location_in_pixel = located_event->location() + offset; On 2015/02/13 20:27:36, ...
5 years, 10 months ago (2015-02-13 20:31:09 UTC) #6
commit-bot: I haz the power
Patchset 2 (id:??) landed as https://crrev.com/c4a76234ea701f22a870231d1b900a367693acc6 Cr-Commit-Position: refs/heads/master@{#316373}
5 years, 10 months ago (2015-02-14 04:36:14 UTC) #7
sadrul
5 years, 10 months ago (2015-02-14 04:36:25 UTC) #8
Message was sent while issue was closed.
Committed patchset #2 (id:20001) manually as
c4a76234ea701f22a870231d1b900a367693acc6 (presubmit successful).

Powered by Google App Engine
This is Rietveld 408576698