Add resolution member to client info struct. Interpret new third parameter for screen size.
This commit is contained in:
parent
6479d0e8fa
commit
ee1731cf9b
@ -202,6 +202,14 @@ void guacd_handle_connection(guac_socket* socket) {
|
|||||||
client->info.optimal_width = atoi(size->argv[0]);
|
client->info.optimal_width = atoi(size->argv[0]);
|
||||||
client->info.optimal_height = atoi(size->argv[1]);
|
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 */
|
/* Store audio mimetypes */
|
||||||
client->info.audio_mimetypes = malloc(sizeof(char*) * (audio->argc+1));
|
client->info.audio_mimetypes = malloc(sizeof(char*) * (audio->argc+1));
|
||||||
memcpy(client->info.audio_mimetypes, audio->argv,
|
memcpy(client->info.audio_mimetypes, audio->argv,
|
||||||
|
@ -238,6 +238,15 @@ typedef struct guac_client_info {
|
|||||||
*/
|
*/
|
||||||
const char** video_mimetypes;
|
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;
|
} guac_client_info;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
Loading…
Reference in New Issue
Block a user