This repository has been archived by the owner on Apr 3, 2020. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 211
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
ozone: evdev: Keep track of settings & apply to new devices
This closes two large holes in the settings code: (1) Any changes made before the input device thread starts are lost. (2) Settings are not internally applied to new devices on hotplug. In theory these problems should not have mattered because there is a DeviceChangeHandler class to watch for new devices & reapply settings whenever a new device appears. However, in practice that class is not actually instantiated. We've had several reports of settings not being properly applied. To fix (1) build up desired settings state on the UI thread in InputControllerEvdev, and push it to InputDeviceFactoryEvdev once the thread starts. To fix (2) keep the desired settings state on InputDeviceFactoryEvdev, and reapply settings on hotplug. BUG=451743 TEST=Turned on australian scrolling & ran "sudo restart udev" on link_freon. Verified scrolling is still australian. Review URL: https://codereview.chromium.org/951063004 Cr-Commit-Position: refs/heads/master@{#317851}
- Loading branch information
Showing
11 changed files
with
159 additions
and
99 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,30 @@ | ||
// Copyright 2015 The Chromium Authors. All rights reserved. | ||
// Use of this source code is governed by a BSD-style license that can be | ||
// found in the LICENSE file. | ||
|
||
#include "ui/events/ozone/evdev/input_device_settings_evdev.h" | ||
|
||
namespace ui { | ||
|
||
const int kDefaultSensitivity = 3; | ||
|
||
// The initial settings are not critical since they will be shortly be changed | ||
// to the user's preferences or the application's own defaults. | ||
|
||
InputDeviceSettingsEvdev::InputDeviceSettingsEvdev() | ||
: tap_to_click_enabled(true), | ||
three_finger_click_enabled(false), | ||
tap_dragging_enabled(false), | ||
natural_scroll_enabled(false), | ||
tap_to_click_paused(false), | ||
touchpad_sensitivity(kDefaultSensitivity), | ||
mouse_sensitivity(kDefaultSensitivity) { | ||
} | ||
|
||
InputDeviceSettingsEvdev::InputDeviceSettingsEvdev( | ||
const InputDeviceSettingsEvdev& other) = default; | ||
|
||
InputDeviceSettingsEvdev::~InputDeviceSettingsEvdev() { | ||
} | ||
|
||
} // namespace ui |
Oops, something went wrong.