[
https://issues.apache.org/jira/browse/GUACAMOLE-165?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
]
Michael Jumper updated GUACAMOLE-165:
-------------------------------------
Component/s: (was: guacamole-client)
guacamole
> Optimal height/width calculations incorrect if client template is modified
> --------------------------------------------------------------------------
>
> Key: GUACAMOLE-165
> URL: https://issues.apache.org/jira/browse/GUACAMOLE-165
> Project: Guacamole
> Issue Type: Bug
> Components: guacamole
> Affects Versions: 0.9.10-incubating
> Environment: browser
> Reporter: Marko Nikolić
> Priority: Trivial
>
> If the client template is modified such that the Guacamole display does not
> occupy the whole browser window, the width/height values submitted as
> "optimal" via {{GUAC_WIDTH}} and {{GUAC_HEIGHT}} will not match the actual
> space available for the client display:
> {code:javascript|title=ManagedClient.js}
> // Calculate optimal width/height for display
> var pixel_density = $window.devicePixelRatio || 1;
> var optimal_dpi = pixel_density * 96;
> var optimal_width = $window.innerWidth * pixel_density;
> var optimal_height = $window.innerHeight * pixel_density;
> // Build base connect string
> var connectString =
> "token=" +
> encodeURIComponent(authenticationService.getCurrentToken())
> + "&GUAC_DATA_SOURCE=" + encodeURIComponent(identifier.dataSource)
> + "&GUAC_ID=" + encodeURIComponent(identifier.id)
> + "&GUAC_TYPE=" + encodeURIComponent(identifier.type)
> + "&GUAC_WIDTH=" + Math.floor(optimal_width)
> + "&GUAC_HEIGHT=" + Math.floor(optimal_height)
> + "&GUAC_DPI=" + Math.floor(optimal_dpi)
> + (connectionParameters ? '&' + connectionParameters : '');
> {code}
--
This message was sent by Atlassian JIRA
(v6.3.4#6332)