Details
-
Bug
-
Status: Closed
-
Minor
-
Resolution: Fixed
-
None
-
None
Description
The guac_common_surface_dup() function currently contains the following code for syncing the multitouch support attribute for a layer:
/* Synchronize layer-specific properties if applicable */ if (surface->layer->index > 0) { /* Synchronize opacity */ guac_protocol_send_shade(socket, surface->layer, surface->opacity); /* Synchronize location and hierarchy */ guac_protocol_send_move(socket, surface->layer, surface->parent, surface->x, surface->y, surface->z); /* Synchronize multi-touch support level */ guac_protocol_send_set_int(surface->socket, surface->layer, GUAC_PROTOCOL_LAYER_PARAMETER_MULTI_TOUCH, surface->touches); }
This is incorrect because:
- The multitouch attribute applies only to the default layer (layer 0), but this if ensures that's exactly the only layer this function won't send that attribute for.
- The wrong guac_socket is referenced (it should be sent to the socket supplied to the guac_common_surface_dup() call, not the surface's socket.
Depending on timing of any call to guac_common_surface_set_multitouch(), this can result in multitouch support not having any effect.
Instead, the multitouch attribute should be sent for only the default layer and to the correct socket.