mirror of
https://github.com/gyurix1968/guacamole-client.git
synced 2025-09-07 13:41:21 +00:00
Force minimum 600x600 screen resolution when requesting .
This commit is contained in:
@@ -141,6 +141,17 @@
|
||||
|
||||
try {
|
||||
|
||||
// Calculate optimal width/height for display
|
||||
var optimal_width = window.innerWidth;
|
||||
var optimal_height = window.innerHeight;
|
||||
|
||||
// Scale width/height to be at least 600x600
|
||||
if (optimal_width < 600 || optimal_height < 600) {
|
||||
var scale = Math.max(600 / optimal_width, 600 / optimal_height);
|
||||
optimal_width *= scale;
|
||||
optimal_height *= scale;
|
||||
}
|
||||
|
||||
// Get entire query string, and pass to connect().
|
||||
// Normally, only the "id" parameter is required, but
|
||||
// all parameters should be preserved and passed on for
|
||||
@@ -148,8 +159,8 @@
|
||||
|
||||
var connect_string =
|
||||
window.location.search.substring(1)
|
||||
+ "&width=" + window.innerWidth
|
||||
+ "&height=" + window.innerHeight;
|
||||
+ "&width=" + optimal_width
|
||||
+ "&height=" + optimal_height;
|
||||
|
||||
// Add audio mimetypes to connect_string
|
||||
GuacamoleUI.supportedAudio.forEach(function(mimetype) {
|
||||
|
Reference in New Issue
Block a user