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

Unified Diff: ui/events/ozone/evdev/input_device_factory_evdev.cc

Issue 1170373002: ozone: evdev: Make sure to device list update during startup scan (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 5 years, 6 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 | « no previous file | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: ui/events/ozone/evdev/input_device_factory_evdev.cc
diff --git a/ui/events/ozone/evdev/input_device_factory_evdev.cc b/ui/events/ozone/evdev/input_device_factory_evdev.cc
index 11a8f1e1f9641426798550e2736544aa302b694b..a909ba53c966e3d6c03f21103ae001f5961bc5ff 100644
--- a/ui/events/ozone/evdev/input_device_factory_evdev.cc
+++ b/ui/events/ozone/evdev/input_device_factory_evdev.cc
@@ -250,8 +250,8 @@ void InputDeviceFactoryEvdev::AttachInputDevice(
ApplyCapsLockLed();
}
- if (--pending_device_changes_ == 0)
- NotifyDevicesUpdated();
+ --pending_device_changes_;
+ NotifyDevicesUpdated();
}
void InputDeviceFactoryEvdev::DetachInputDevice(const base::FilePath& path) {
@@ -405,6 +405,8 @@ void InputDeviceFactoryEvdev::UpdateDirtyFlags(
}
void InputDeviceFactoryEvdev::NotifyDevicesUpdated() {
+ if (pending_device_changes_)
+ return; // No update until pending opens complete.
if (touchscreen_list_dirty_)
NotifyTouchscreensUpdated();
if (keyboard_list_dirty_)
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698