Mike Jumper created GUACAMOLE-1918:
--------------------------------------

             Summary: Multitouch attribute not correctly synced for 
guac_common_surface
                 Key: GUACAMOLE-1918
                 URL: https://issues.apache.org/jira/browse/GUACAMOLE-1918
             Project: Guacamole
          Issue Type: Bug
            Reporter: Mike Jumper


The {{guac_common_surface_dup()}} function currently contains the following 
code for syncing the multitouch support attribute for a layer:

{code:none}
    /* 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);

    }
{code}

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.



--
This message was sent by Atlassian Jira
(v8.20.10#820010)

Reply via email to