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

Side by Side Diff: ui/events/ozone/evdev/event_converter_evdev_impl.cc

Issue 896243002: Log dropped input events (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 5 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 unified diff | Download patch
« no previous file with comments | « no previous file | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright 2014 The Chromium Authors. All rights reserved. 1 // Copyright 2014 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 #include "ui/events/ozone/evdev/event_converter_evdev_impl.h" 5 #include "ui/events/ozone/evdev/event_converter_evdev_impl.h"
6 6
7 #include <errno.h> 7 #include <errno.h>
8 #include <linux/input.h> 8 #include <linux/input.h>
9 9
10 #include "ui/events/event.h" 10 #include "ui/events/event.h"
(...skipping 78 matching lines...) Expand 10 before | Expand all | Expand 10 after
89 for (int i = 0; i < count; ++i) { 89 for (int i = 0; i < count; ++i) {
90 const input_event& input = inputs[i]; 90 const input_event& input = inputs[i];
91 switch (input.type) { 91 switch (input.type) {
92 case EV_KEY: 92 case EV_KEY:
93 ConvertKeyEvent(input); 93 ConvertKeyEvent(input);
94 break; 94 break;
95 case EV_REL: 95 case EV_REL:
96 ConvertMouseMoveEvent(input); 96 ConvertMouseMoveEvent(input);
97 break; 97 break;
98 case EV_SYN: 98 case EV_SYN:
99 if (input.code == SYN_DROPPED)
100 LOG(WARNING) << "kernel dropped input events";
99 FlushEvents(); 101 FlushEvents();
100 break; 102 break;
101 } 103 }
102 } 104 }
103 } 105 }
104 106
105 void EventConverterEvdevImpl::ConvertKeyEvent(const input_event& input) { 107 void EventConverterEvdevImpl::ConvertKeyEvent(const input_event& input) {
106 // Ignore repeat events. 108 // Ignore repeat events.
107 if (input.value == kKeyRepeatValue) 109 if (input.value == kKeyRepeatValue)
108 return; 110 return;
(...skipping 42 matching lines...) Expand 10 before | Expand all | Expand 10 after
151 cursor_->MoveCursor(gfx::Vector2dF(x_offset_, y_offset_)); 153 cursor_->MoveCursor(gfx::Vector2dF(x_offset_, y_offset_));
152 154
153 dispatcher_->DispatchMouseMoveEvent( 155 dispatcher_->DispatchMouseMoveEvent(
154 MouseMoveEventParams(id_, cursor_->GetLocation())); 156 MouseMoveEventParams(id_, cursor_->GetLocation()));
155 157
156 x_offset_ = 0; 158 x_offset_ = 0;
157 y_offset_ = 0; 159 y_offset_ = 0;
158 } 160 }
159 161
160 } // namespace ui 162 } // namespace ui
OLDNEW
« 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