Uploaded image for project: 'Guacamole'
  1. Guacamole
  2. GUACAMOLE-165

Optimal height/width calculations incorrect if client template is modified

    XMLWordPrintableJSON

Details

    • Bug
    • Status: Open
    • Trivial
    • Resolution: Unresolved
    • 0.9.10-incubating
    • None
    • guacamole
    • None
    • browser

    Description

      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:

      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 : '');
      

      Attachments

        Issue Links

          Activity

            People

              Unassigned Unassigned
              mnikolic Marko Nikolić
              Votes:
              0 Vote for this issue
              Watchers:
              2 Start watching this issue

              Dates

                Created:
                Updated: