Skip to content

Commit

Permalink
GUACAMOLE-377: Send a sync instruction to users when synchronizing su…
Browse files Browse the repository at this point in the history
…rfaces.
  • Loading branch information
aleitner committed Jan 23, 2023
1 parent f6893ed commit 3b0a9ba
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion src/common/display.c
Original file line number Diff line number Diff line change
Expand Up @@ -166,6 +166,8 @@ void guac_common_display_free(guac_common_display* display) {
void guac_common_display_dup(guac_common_display* display, guac_user* user,
guac_socket* socket) {

guac_client* client = user->client;

pthread_mutex_lock(&display->_lock);

/* Sunchronize shared cursor */
Expand All @@ -178,6 +180,9 @@ void guac_common_display_dup(guac_common_display* display, guac_user* user,
guac_common_display_dup_layers(display->layers, user, socket);
guac_common_display_dup_layers(display->buffers, user, socket);

/* Sends a sync instruction to mark the boundary of the first frame */
guac_protocol_send_sync(socket, client->last_sent_timestamp, 1);

pthread_mutex_unlock(&display->_lock);

}
Expand Down Expand Up @@ -384,4 +389,3 @@ void guac_common_display_free_buffer(guac_common_display* display,
pthread_mutex_unlock(&display->_lock);

}

0 comments on commit 3b0a9ba

Please sign in to comment.