You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@guacamole.apache.org by mike-jumper <gi...@git.apache.org> on 2017/03/11 22:51:48 UTC

[GitHub] incubator-guacamole-server pull request #76: GUACAMOLE-231: Report server-si...

GitHub user mike-jumper opened a pull request:

    https://github.com/apache/incubator-guacamole-server/pull/76

    GUACAMOLE-231: Report server-side mouse position using "mouse" instruction.

    This change adds a new "mouse" instruction which reports the current location of the mouse cursor to all users not actively moving the mouse, allowing the client to handle rendering of the shared cursor (rather than relying on the server to render the cursor itself).

You can merge this pull request into a Git repository by running:

    $ git pull https://github.com/mike-jumper/incubator-guacamole-server send-mouse-pos

Alternatively you can review and apply these changes as the patch at:

    https://github.com/apache/incubator-guacamole-server/pull/76.patch

To close this pull request, make a commit to your master/trunk branch
with (at least) the following in the commit message:

    This closes #76
    
----
commit 89df0ffbfcdd7eb360d0e95cac0e5ea59b2f6625
Author: Michael Jumper <mj...@apache.org>
Date:   2017-03-10T20:27:24Z

    GUACAMOLE-231: Add "mouse" instruction for server reporting of mouse position.

commit 05a528b47c37d467c4bf31929a694a989cc992be
Author: Michael Jumper <mj...@apache.org>
Date:   2017-03-10T20:28:00Z

    GUACAMOLE-231: Report mouse position using new "mouse" instruction. Rely on client-side cursor layer implementation.

commit 7e669d7ca4053d45d93032fb5175cd77bd13d072
Author: Michael Jumper <mj...@apache.org>
Date:   2017-03-11T22:35:43Z

    GUACAMOLE-231: Broadcast mouse position only to users who are not moving the mouse.

----


---
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 infrastructure@apache.org or file a JIRA ticket
with INFRA.
---

[GitHub] incubator-guacamole-server pull request #76: GUACAMOLE-231: Report server-si...

Posted by asfgit <gi...@git.apache.org>.
Github user asfgit closed the pull request at:

    https://github.com/apache/incubator-guacamole-server/pull/76


---
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 infrastructure@apache.org or file a JIRA ticket
with INFRA.
---

[GitHub] incubator-guacamole-server pull request #76: GUACAMOLE-231: Report server-si...

Posted by jmuehlner <gi...@git.apache.org>.
Github user jmuehlner commented on a diff in the pull request:

    https://github.com/apache/incubator-guacamole-server/pull/76#discussion_r105828607
  
    --- 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 --
    
    Ok, makes sense.


---
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 infrastructure@apache.org or file a JIRA ticket
with INFRA.
---

[GitHub] incubator-guacamole-server pull request #76: GUACAMOLE-231: Report server-si...

Posted by mike-jumper <gi...@git.apache.org>.
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 infrastructure@apache.org or file a JIRA ticket
with INFRA.
---

[GitHub] incubator-guacamole-server pull request #76: GUACAMOLE-231: Report server-si...

Posted by jmuehlner <gi...@git.apache.org>.
Github user jmuehlner commented on a diff in the pull request:

    https://github.com/apache/incubator-guacamole-server/pull/76#discussion_r105828074
  
    --- 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 --
    
    Why is guac_client_foreach_user no longer required here?


---
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 infrastructure@apache.org or file a JIRA ticket
with INFRA.
---