From 9024a1f8029160283b8175be561e7b425dd15937 Mon Sep 17 00:00:00 2001 From: Michael Jumper Date: Fri, 5 Dec 2014 13:56:20 -0800 Subject: [PATCH] GUAC-898: Send new display size to Guacamole when window size changes. --- .../src/main/webapp/app/client/directives/guacClient.js | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/guacamole/src/main/webapp/app/client/directives/guacClient.js b/guacamole/src/main/webapp/app/client/directives/guacClient.js index 3a51729c9..f736e4ed9 100644 --- a/guacamole/src/main/webapp/app/client/directives/guacClient.js +++ b/guacamole/src/main/webapp/app/client/directives/guacClient.js @@ -427,7 +427,15 @@ angular.module('client').directive('guacClient', [function guacClient() { // If the window is resized, attempt to resize client $window.addEventListener('resize', function onResizeWindow() { + + // Send new display size, if changed + if (client && display) { + if (display.getWidth() !== main.offsetWidth || display.getHeight() !== main.offsetHeight) + client.sendSize(main.offsetWidth, main.offsetHeight); + } + $scope.safeApply(updateDisplayScale); + }); /*