Add resolution member to client info struct. Interpret new third parameter for screen size.

This commit is contained in:
Michael Jumper 2013-12-27 00:07:17 -08:00
parent 6479d0e8fa
commit ee1731cf9b
2 changed files with 17 additions and 0 deletions

View File

@ -202,6 +202,14 @@ void guacd_handle_connection(guac_socket* socket) {
client->info.optimal_width = atoi(size->argv[0]);
client->info.optimal_height = atoi(size->argv[1]);
/* If DPI given, set the client resolution */
if (size->argc >= 3)
client->info.optimal_resolution = atoi(size->argv[2]);
/* Otherwise, use a safe default for rough backwards compatibility */
else
client->info.optimal_resolution = 96;
/* Store audio mimetypes */
client->info.audio_mimetypes = malloc(sizeof(char*) * (audio->argc+1));
memcpy(client->info.audio_mimetypes, audio->argv,

View File

@ -238,6 +238,15 @@ typedef struct guac_client_info {
*/
const char** video_mimetypes;
/**
* The DPI of the physical remote display if configured for the optimal
* width/height combination described here. This need not be honored by
* a client plugin implementation, but if the underlying protocol of the
* client plugin supports dynamic sizing of the screen, honoring the
* stated resolution of the display size request is recommended.
*/
int optimal_resolution;
} guac_client_info;
/**