aws-samples / aws-samples/dcv-extension-sdk-samples

StreamingViewsChangedEvent data isn't consistent/reliable

Open
#5 3 comments 0 reactions 0 assignees View on GitHub
Dominant language
No language data
Stars
15
Forks
4
PR merge metrics
No merged PRs in 30d

Description

Parameters in StreamingViewsChangedEvent are not consistent, I tested with AWS workspace version 5.26.2 and 5.27.1 and found the values for local_area().x() and local_area().y() would sometimes report values like -31000 when workspace app z-order is changed. I also found many cases where the view.handle was null. From the protobuf-generated code, I printed the values for each StreamingView below:
```
ZTSLOG << __FUNCTION__ << " handle= " << view.handle() << ", view_id = " << view.view_id() << ", zoom:" << view.zoom_factor() << ", ["
<< view.local_area().width() << " x " << view.local_area().height() << " (" << view.local_area().x() << " , " << view.local_area().y() << ") ] "
<< ", offset x:" << view.remote_offset().x() << ", y:" << view.remote_offset().y() << "\r\n";
```

In the logs where I printed local_area().x() and local_area().y(), I saw some cases where values jump to -32000, -31973 - same window handle:

```
OnStreamingViewsChanged handle= 659938, view_id = 0, zoom:1, [3440 x 1342 (2560 , 50) ] , offset x:0, y:0
OnStreamingViewsChanged handle= 659938, view_id = 0, zoom:1, [3440 x 1342 (2560 , 50) ] , offset x:0, y:0
OnStreamingViewsChanged handle= 659938, view_id = 0, zoom:1, [3440 x 1342 (-32000 , -31973) ] , offset x:0, y:0
OnStreamingViewsChanged handle= 659938, view_id = 0, zoom:1, [3440 x 1342 (2560 , 50) ] , offset x:0, y:0
```

The case with invalid (NULL) handle happens sometimes when moving the workspaces window across my screen (like to new monitor). While I can filter these out, I found there's a long delay after moving the window (usually 10s or more) where the handle is not yet available so I wanted to check what the expectation was for this API
```
OnStreamingViewsChanged handle= 922082, view_id = 0, zoom:1.25, [2560 x 1318 (0 , 62) ] , offset x:0, y:0
OnStreamingViewsChanged handle= 0, view_id = 0, zoom:1, [2560 x 1318 (0 , 62) ] , offset x:0, y:0
OnStreamingViewsChanged handle= 987618, view_id = 0, zoom:1, [2560 x 1318 (0 , 62) ] , offset x:0, y:0
```

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.