Github user mike-jumper commented on a diff in the pull request:
https://github.com/apache/incubator-guacamole-server/pull/76#discussion_r105828367
--- Diff: src/common/cursor.c ---
@@ -295,25 +209,19 @@ void guac_common_cursor_set_argb(guac_common_cursor*
cursor, int hx, int hy,
cursor->hotspot_x = hx;
cursor->hotspot_y = hy;
- /* Update location based on new hotspot */
- guac_protocol_send_move(cursor->client->socket, cursor->layer,
- GUAC_DEFAULT_LAYER,
- cursor->x - hx,
- cursor->y - hy,
- INT_MAX);
-
/* Broadcast new cursor image to all users */
- guac_protocol_send_size(cursor->client->socket, cursor->layer,
+ guac_protocol_send_size(cursor->client->socket, cursor->buffer,
width, height);
- guac_client_foreach_user(cursor->client, __send_user_cursor_image,
cursor);
+ guac_client_stream_png(cursor->client, cursor->client->socket,
--- End diff --
It was actually never required.
I think this was written prior to implementation of
`guac_client_stream_png()` and client-scoped streams. The old
`guac_client_foreach_user()` call here just invoked `guac_user_stream_png()`
for each connected user. That's equivalent to `guac_client_stream_png()` in
that each user receives the image, but bad because the encoding process occurs
once per user.
With `guac_client_stream_png()`, a stream is allocated at the client scope
and the image (encoded only the once) is streamed over the broadcast socket.
---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at [email protected] or file a JIRA ticket
with INFRA.
---