Allow embedders to specify pointer device IDs. (flutter/engine#7790)
This commit is contained in:
@@ -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);
|
||||
|
||||
@@ -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;
|
||||
|
||||
Reference in New Issue
Block a user