You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@guacamole.apache.org by "jmuehlner (via GitHub)" <gi...@apache.org> on 2024/09/05 21:30:58 UTC
[PR] GUACAMOLE-1196: Fix VNC resizing behavior. [guacamole-server]
jmuehlner opened a new pull request, #544:
URL: https://github.com/apache/guacamole-server/pull/544
VNC resizing was not working for me - I'm getting this message every time I attempt to resize the window, as well as on initial load:
`ERROR: Screen has not been initialized, cannot send resize.`
I dug into it, and I found two problems:
1. The RFB client screen ID was never set, which caused any message from the server specifying a screen size to be ignored by the client.
2. The guacamole display was never resized after sending the resize request to the VNC server.
I've fixed these two issues, though I'm not sure if this is the cleanest way of doing it.
@necouchman mind having a look? I know you're much more familliar with this code than me.
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: dev-unsubscribe@guacamole.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
Re: [PR] GUACAMOLE-1196: Fix VNC resizing behavior. [guacamole-server]
Posted by "jmuehlner (via GitHub)" <gi...@apache.org>.
jmuehlner commented on code in PR #544:
URL: https://github.com/apache/guacamole-server/pull/544#discussion_r1746185310
##########
src/protocols/vnc/display.c:
##########
@@ -182,22 +182,22 @@ static rfbBool guac_vnc_send_desktop_size(rfbClient* client, int width, int heig
/* Get the Guacamole client data */
guac_client* gc = rfbClientGetClientData(client, GUAC_VNC_CLIENT_KEY);
+ guac_client_log(gc, GUAC_LOG_TRACE,
+ "Current screen size is %ix%i; setting new size %ix%i\n",
+ rfbClientSwap16IfLE(client->screen.width),
+ rfbClientSwap16IfLE(client->screen.height),
+ width, height);
+
#ifdef LIBVNC_CLIENT_HAS_SCREEN
- /* Don't send an update if the sreen appears to be uninitialized. */
Review Comment:
I removed this because the screen size seems to be never initialized by the time that the owner attempts to set the initial size, so any initial resize will fail.
The screen size will be updated when a message comes back from the server specifying the updated size, but this in practice does not happen before the initial resize attempt.
In any case, removing this check fixes the initial resize issue, and doesn't seem to cause any problems that I can see.
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: dev-unsubscribe@guacamole.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
Re: [PR] GUACAMOLE-1196: Fix VNC resizing behavior. [guacamole-server]
Posted by "jmuehlner (via GitHub)" <gi...@apache.org>.
jmuehlner commented on code in PR #544:
URL: https://github.com/apache/guacamole-server/pull/544#discussion_r1746185310
##########
src/protocols/vnc/display.c:
##########
@@ -182,22 +182,22 @@ static rfbBool guac_vnc_send_desktop_size(rfbClient* client, int width, int heig
/* Get the Guacamole client data */
guac_client* gc = rfbClientGetClientData(client, GUAC_VNC_CLIENT_KEY);
+ guac_client_log(gc, GUAC_LOG_TRACE,
+ "Current screen size is %ix%i; setting new size %ix%i\n",
+ rfbClientSwap16IfLE(client->screen.width),
+ rfbClientSwap16IfLE(client->screen.height),
+ width, height);
+
#ifdef LIBVNC_CLIENT_HAS_SCREEN
- /* Don't send an update if the sreen appears to be uninitialized. */
Review Comment:
I removed this because the screen size seems to be never initialized by the time that the owner attempts to set the initial screen size, so any initial screen resize will fail.
The screen size will be updated when a message comes back from the server specifying the updated size, but this in practice does not happen before the initial resize attempt.
In any case, removing this check fixes the initial resize issue, and doesn't seem to cause any problems that I can see.
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: dev-unsubscribe@guacamole.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
Re: [PR] GUACAMOLE-1196: Fix VNC resizing behavior. [guacamole-server]
Posted by "necouchman (via GitHub)" <gi...@apache.org>.
necouchman merged PR #544:
URL: https://github.com/apache/guacamole-server/pull/544
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: dev-unsubscribe@guacamole.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
Re: [PR] GUACAMOLE-1196: Fix VNC resizing behavior. [guacamole-server]
Posted by "jmuehlner (via GitHub)" <gi...@apache.org>.
jmuehlner commented on code in PR #544:
URL: https://github.com/apache/guacamole-server/pull/544#discussion_r1746185310
##########
src/protocols/vnc/display.c:
##########
@@ -182,22 +182,22 @@ static rfbBool guac_vnc_send_desktop_size(rfbClient* client, int width, int heig
/* Get the Guacamole client data */
guac_client* gc = rfbClientGetClientData(client, GUAC_VNC_CLIENT_KEY);
+ guac_client_log(gc, GUAC_LOG_TRACE,
+ "Current screen size is %ix%i; setting new size %ix%i\n",
+ rfbClientSwap16IfLE(client->screen.width),
+ rfbClientSwap16IfLE(client->screen.height),
+ width, height);
+
#ifdef LIBVNC_CLIENT_HAS_SCREEN
- /* Don't send an update if the sreen appears to be uninitialized. */
Review Comment:
I removed this because the screen size seems to be never initialized by the time that the owner attempts to set the initial size, so any initial resize will fail.
The screen size will be updated when a message comes back from the server specifying the updated size, but this in practice does not happen before the initial resize attempt.
In any case, removing this check fixes the initial resize issue, and doesn't seem to cause any problems that I can see.
See https://github.com/LibVNC/libvncserver/blob/27617e141ed91551087960ff8e48db0db8258dad/src/libvncclient/rfbclient.c#L2126-L2128
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: dev-unsubscribe@guacamole.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org