Skip to content

Commit

Permalink
Allow embedders to specify pointer device IDs. (flutter#7790)
Browse files Browse the repository at this point in the history
  • Loading branch information
chinmaygarde authored Feb 12, 2019
1 parent 4663d35 commit 87b40ba
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 0 deletions.
1 change: 1 addition & 0 deletions shell/platform/embedder/embedder.cc
Original file line number Diff line number Diff line change
Expand Up @@ -576,6 +576,7 @@ FlutterEngineResult FlutterEngineSendPointerEvent(
pointer_data.kind = blink::PointerData::DeviceKind::kMouse;
pointer_data.physical_x = SAFE_ACCESS(current, x, 0.0);
pointer_data.physical_y = SAFE_ACCESS(current, y, 0.0);
pointer_data.device = SAFE_ACCESS(current, device, 0);
packet->SetPointerData(i, pointer_data);
current = reinterpret_cast<const FlutterPointerEvent*>(
reinterpret_cast<const uint8_t*>(current) + current->struct_size);
Expand Down
3 changes: 3 additions & 0 deletions shell/platform/embedder/embedder.h
Original file line number Diff line number Diff line change
Expand Up @@ -157,6 +157,9 @@ typedef struct {
size_t timestamp; // in microseconds.
double x;
double y;
// An optional device identifier. If this is not specified, it is assumed that
// the embedder has no multitouch capability.
int32_t device;
} FlutterPointerEvent;

struct _FlutterPlatformMessageResponseHandle;
Expand Down

0 comments on commit 87b40ba

Please sign in to comment.