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

Unified Diff: mojo/services/public/cpp/input_events/lib/input_events_type_converters.cc

Issue 399743003: x11: Listen for and process XInput2 events. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: . Created 6 years, 5 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 | mojo/services/view_manager/window_tree_host_impl.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: mojo/services/public/cpp/input_events/lib/input_events_type_converters.cc
diff --git a/mojo/services/public/cpp/input_events/lib/input_events_type_converters.cc b/mojo/services/public/cpp/input_events/lib/input_events_type_converters.cc
index aa07305f4405a8d0dd16e63ceedfefc72eb6c364..dbd8f70848ffc28ea54efbcbafbf87b4039f1339 100644
--- a/mojo/services/public/cpp/input_events/lib/input_events_type_converters.cc
+++ b/mojo/services/public/cpp/input_events/lib/input_events_type_converters.cc
@@ -98,6 +98,20 @@ TypeConverter<EventPtr, scoped_ptr<ui::Event> >::ConvertTo(
input->flags));
break;
}
+ case ui::ET_TOUCH_MOVED:
+ case ui::ET_TOUCH_PRESSED:
+ case ui::ET_TOUCH_CANCELLED:
+ case ui::ET_TOUCH_RELEASED: {
+ gfx::Point location(input->location->x, input->location->y);
+ ui_event.reset(new ui::TouchEvent(
+ static_cast<ui::EventType>(input->action),
+ location,
+ input->flags,
+ input->touch_data->pointer_id,
+ base::TimeDelta::FromInternalValue(input->time_stamp),
+ 0.f, 0.f, 0.f, 0.f));
+ break;
+ }
default:
// TODO: support other types.
// NOTIMPLEMENTED();
« no previous file with comments | « no previous file | mojo/services/view_manager/window_tree_host_impl.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698