GUACAMOLE-184: Only send contents of surface if non-empty.
This commit is contained in:
parent
5d5fbb4d45
commit
bd3d482ade
@ -1718,6 +1718,9 @@ void guac_common_surface_dup(guac_common_surface* surface, guac_user* user,
|
|||||||
guac_protocol_send_size(socket, surface->layer,
|
guac_protocol_send_size(socket, surface->layer,
|
||||||
surface->width, surface->height);
|
surface->width, surface->height);
|
||||||
|
|
||||||
|
/* Send contents of layer, if non-empty */
|
||||||
|
if (surface->width > 0 && surface->height > 0) {
|
||||||
|
|
||||||
/* Get entire surface */
|
/* Get entire surface */
|
||||||
cairo_surface_t* rect = cairo_image_surface_create_for_data(
|
cairo_surface_t* rect = cairo_image_surface_create_for_data(
|
||||||
surface->buffer, CAIRO_FORMAT_RGB24,
|
surface->buffer, CAIRO_FORMAT_RGB24,
|
||||||
@ -1728,6 +1731,8 @@ void guac_common_surface_dup(guac_common_surface* surface, guac_user* user,
|
|||||||
0, 0, rect);
|
0, 0, rect);
|
||||||
cairo_surface_destroy(rect);
|
cairo_surface_destroy(rect);
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
complete:
|
complete:
|
||||||
pthread_mutex_unlock(&surface->_lock);
|
pthread_mutex_unlock(&surface->_lock);
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user