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

Unified Diff: components/exo/wayland/server.cc

Issue 2560633002: exo: Implement v6 of touch protocol including shape and frame event (Closed)
Patch Set: Fixed pen pointer mode conflict after rebase Created 4 years 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 | « components/exo/touch_unittest.cc ('k') | ui/events/test/event_generator.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: components/exo/wayland/server.cc
diff --git a/components/exo/wayland/server.cc b/components/exo/wayland/server.cc
index 3b754f5776df8ad3cfaff64d07c7f334775fc6fb..6c6cd47ec458cb6a12e6ba994e8e2aee673bdf60 100644
--- a/components/exo/wayland/server.cc
+++ b/components/exo/wayland/server.cc
@@ -2394,12 +2394,10 @@ class WaylandTouchDelegate : public TouchDelegate {
TimeTicksToMilliseconds(time_stamp), surface_resource,
id, wl_fixed_from_int(location.x()),
wl_fixed_from_int(location.y()));
- wl_client_flush(client());
}
void OnTouchUp(base::TimeTicks time_stamp, int id) override {
wl_touch_send_up(touch_resource_, next_serial(),
TimeTicksToMilliseconds(time_stamp), id);
- wl_client_flush(client());
}
void OnTouchMotion(base::TimeTicks time_stamp,
int id,
@@ -2407,11 +2405,23 @@ class WaylandTouchDelegate : public TouchDelegate {
wl_touch_send_motion(touch_resource_, TimeTicksToMilliseconds(time_stamp),
id, wl_fixed_from_int(location.x()),
wl_fixed_from_int(location.y()));
+ }
+ void OnTouchShape(int id, float major, float minor) override {
+ if (wl_resource_get_version(touch_resource_) >=
+ WL_TOUCH_SHAPE_SINCE_VERSION) {
+ wl_touch_send_shape(touch_resource_, id, wl_fixed_from_double(major),
+ wl_fixed_from_double(minor));
+ }
+ }
+ void OnTouchFrame() override {
+ if (wl_resource_get_version(touch_resource_) >=
+ WL_TOUCH_FRAME_SINCE_VERSION) {
+ wl_touch_send_frame(touch_resource_);
+ }
wl_client_flush(client());
}
void OnTouchCancel() override {
wl_touch_send_cancel(touch_resource_);
- wl_client_flush(client());
}
private:
« no previous file with comments | « components/exo/touch_unittest.cc ('k') | ui/events/test/event_generator.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698