diff options
author | sheckylin@chromium.org <sheckylin@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2013-01-10 06:49:11 +0000 |
---|---|---|
committer | sheckylin@chromium.org <sheckylin@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2013-01-10 06:49:11 +0000 |
commit | 682990f75f1a8684d42be83129b6ca30caa9eca2 (patch) | |
tree | 61e62372ac7bb6fe03ee700739dba376c1dab424 /ash/shell.cc | |
parent | 002de2f6f5aa1287b779c178f39dd112861b9c69 (diff) | |
download | chromium_src-682990f75f1a8684d42be83129b6ca30caa9eca2.zip chromium_src-682990f75f1a8684d42be83129b6ca30caa9eca2.tar.gz chromium_src-682990f75f1a8684d42be83129b6ca30caa9eca2.tar.bz2 |
Scaling scroll/fling events in multi-monitor setup
The CL adds an event filter that transforms input event properties
in the extended desktop environment. It currently scales scroll/fling
events' offset values based on the following logic:
1. Linear scaling w.r.t. the device scale factor, which is 2x for
highDPI displays.
2. 1.2x scaling for external displays, since they are usually larger
than internal ones.
Both scalings can stack on each other, i.e. you can get as high as
a 2.4x boost if you have a high DPI external display.
Contributed by sheckylin@chromium.org
BUG=chromium:166392
TEST=Tested on link w/o external display.
Change-Id: Ie29e03fcf9f6e5ae1dd6231990103237c3129fd6
Review URL: https://chromiumcodereview.appspot.com/11743013
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@176038 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'ash/shell.cc')
-rw-r--r-- | ash/shell.cc | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/ash/shell.cc b/ash/shell.cc index 29029cc..4aa86ee 100644 --- a/ash/shell.cc +++ b/ash/shell.cc @@ -15,6 +15,7 @@ #include "ash/desktop_background/user_wallpaper_delegate.h" #include "ash/display/display_controller.h" #include "ash/display/display_manager.h" +#include "ash/display/event_transformation_handler.h" #include "ash/display/mouse_cursor_event_filter.h" #include "ash/display/screen_position_controller.h" #include "ash/drag_drop/drag_drop_controller.h" @@ -469,6 +470,9 @@ void Shell::Init() { AddPreTargetHandler(accelerator_filter_.get()); #endif + event_transformation_handler_.reset(new internal::EventTransformationHandler); + AddPreTargetHandler(event_transformation_handler_.get()); + system_gesture_filter_.reset(new internal::SystemGestureEventFilter); AddPreTargetHandler(system_gesture_filter_.get()); |