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

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

Issue 1073573002: Ozone support for device special cases in keyboard event rewriting. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: white space Created 5 years, 8 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
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/tablet_event_converter_evdev.h" 5 #include "ui/events/ozone/evdev/tablet_event_converter_evdev.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 "base/message_loop/message_loop.h" 10 #include "base/message_loop/message_loop.h"
(...skipping 127 matching lines...) Expand 10 before | Expand all | Expand 10 after
138 return; 138 return;
139 139
140 if (abs_value_dirty_) { 140 if (abs_value_dirty_) {
141 UpdateCursor(); 141 UpdateCursor();
142 abs_value_dirty_ = false; 142 abs_value_dirty_ = false;
143 } 143 }
144 144
145 bool down = input.value; 145 bool down = input.value;
146 146
147 dispatcher_->DispatchMouseButtonEvent(MouseButtonEventParams( 147 dispatcher_->DispatchMouseButtonEvent(MouseButtonEventParams(
148 id_, cursor_->GetLocation(), button, down, false /* allow_remap */, 148 input_device_.id, cursor_->GetLocation(), button, down,
149 TimeDeltaFromInputEvent(input))); 149 false /* allow_remap */, TimeDeltaFromInputEvent(input)));
150 } 150 }
151 151
152 void TabletEventConverterEvdev::FlushEvents(const input_event& input) { 152 void TabletEventConverterEvdev::FlushEvents(const input_event& input) {
153 if (!cursor_) 153 if (!cursor_)
154 return; 154 return;
155 155
156 // Prevent propagation of invalid data on stylus lift off 156 // Prevent propagation of invalid data on stylus lift off
157 if (stylus_ == 0) { 157 if (stylus_ == 0) {
158 abs_value_dirty_ = false; 158 abs_value_dirty_ = false;
159 return; 159 return;
160 } 160 }
161 161
162 if (!abs_value_dirty_) 162 if (!abs_value_dirty_)
163 return; 163 return;
164 164
165 UpdateCursor(); 165 UpdateCursor();
166 166
167 dispatcher_->DispatchMouseMoveEvent(MouseMoveEventParams( 167 dispatcher_->DispatchMouseMoveEvent(
168 id_, cursor_->GetLocation(), TimeDeltaFromInputEvent(input))); 168 MouseMoveEventParams(input_device_.id, cursor_->GetLocation(),
169 TimeDeltaFromInputEvent(input)));
169 170
170 abs_value_dirty_ = false; 171 abs_value_dirty_ = false;
171 } 172 }
172 173
173 } // namespace ui 174 } // namespace ui
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698