mirror of
https://github.com/gyurix1968/guacamole-client.git
synced 2025-09-06 13:17:41 +00:00
GUAC-898: Adjust width/height based on browser resolution.
This commit is contained in:
@@ -430,8 +430,14 @@ angular.module('client').directive('guacClient', [function guacClient() {
|
||||
|
||||
// Send new display size, if changed
|
||||
if (client && display) {
|
||||
if (display.getWidth() !== main.offsetWidth || display.getHeight() !== main.offsetHeight)
|
||||
client.sendSize(main.offsetWidth, main.offsetHeight);
|
||||
|
||||
var pixel_density = $window.devicePixelRatio || 1;
|
||||
var width = main.offsetWidth * pixel_density;
|
||||
var height = main.offsetHeight * pixel_density;
|
||||
|
||||
if (display.getWidth() !== width || display.getHeight() !== height)
|
||||
client.sendSize(width, height);
|
||||
|
||||
}
|
||||
|
||||
$scope.safeApply(updateDisplayScale);
|
||||
|
Reference in New Issue
Block a user