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

Unified Diff: ui/aura/window_event_dispatcher.cc

Issue 2677153003: Fix event dispatching offset problem in the client-lib in high-dpi mode. (conversion) (Closed)
Patch Set: Created 3 years, 10 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 | « ui/aura/window_event_dispatcher.h ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: ui/aura/window_event_dispatcher.cc
diff --git a/ui/aura/window_event_dispatcher.cc b/ui/aura/window_event_dispatcher.cc
index 6cd3c43e2dad9addd866098702afd9b64af79343..9cff46bba2f152c36139b4bdbe77074e5ebf07ed 100644
--- a/ui/aura/window_event_dispatcher.cc
+++ b/ui/aura/window_event_dispatcher.cc
@@ -71,6 +71,7 @@ WindowEventDispatcher::WindowEventDispatcher(WindowTreeHost* host)
mouse_moved_handler_(NULL),
event_dispatch_target_(NULL),
old_dispatch_target_(NULL),
+ transform_events_(true),
synthesize_mouse_move_(false),
move_hold_count_(0),
dispatching_held_event_(nullptr),
@@ -424,8 +425,10 @@ void WindowEventDispatcher::OnEventProcessingStarted(ui::Event* event) {
// The held events are already in |window()|'s coordinate system. So it is
// not necessary to apply the transform to convert from the host's
// coordinate system to |window()|'s coordinate system.
- if (event->IsLocatedEvent() && !is_dispatched_held_event(*event))
+ if (event->IsLocatedEvent() && !is_dispatched_held_event(*event) &&
+ transform_events_) {
TransformEventForDeviceScaleFactor(static_cast<ui::LocatedEvent*>(event));
+ }
if (mus_mouse_location_updater_)
mus_mouse_location_updater_->OnEventProcessingStarted(*event);
« no previous file with comments | « ui/aura/window_event_dispatcher.h ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698