guacamole-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Lawrence Cortright <>
Subject Resizing/Scaling in JS API
Date Sun, 11 Sep 2016 13:59:46 GMT
Hi again everyone,

So I'm attempting to segment a 4k monitor into equal-ish <div>s to place
several VNC sessions into. Sort-of a VNC "dashboard," I suppose. In
reality, what I'm attempting to do is create a "preview" functionality
similar to something like a Crestron system does for a VNC-based
video-switch system for our lab. As one can guess, a poor analogue for a Crestron system.

So what I'm looking for is a way to fit several sessions into
equal-sized containers. I'm not overly concerned about resolution,
performance concerns, or if
part of the screen gets cut off. My problem is, I've not found a method that lets me
set the client display size to an exact width and height.

Display.scale() could work. I could set the scale ratio so that
everything is at least the same width. This is assuming that I could do math that involved
obtaining the width or height of the element being displayed. However,
both Display.getWidth() and Display.getHeight() return zero. I'm either
fundamentally misunderstanding the usage of these two or catching the
display before anything is being sent. 

So questions from this mess - can I actually force the client
displays into exact widths and heights? If so, what methods would do this?

And, are getWidth() and getHeight() appropriate methods for what I
described regarding the scaling attempt? If so, what
might I be doing wrong with them?

Thank you,
Larry Cortright

View raw message