Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

GUACAMOLE-1196: Read VNC dimensions directly from the client, not the screen. #550

Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
10 changes: 2 additions & 8 deletions src/protocols/vnc/display.c
Original file line number Diff line number Diff line change
Expand Up @@ -51,16 +51,10 @@ void guac_vnc_update(rfbClient* client, int x, int y, int w, int h) {
guac_client* gc = rfbClientGetClientData(client, GUAC_VNC_CLIENT_KEY);
guac_vnc_client* vnc_client = (guac_vnc_client*) gc->data;

#ifdef LIBVNC_CLIENT_HAS_SCREEN
int new_height = rfbClientSwap16IfLE(client->screen.height);
int new_width = rfbClientSwap16IfLE(client->screen.width);
#else
int new_height = rfbClientSwap16IfLE(client->height);
jmuehlner marked this conversation as resolved.
Show resolved Hide resolved
int new_width = rfbClientSwap16IfLE(client->width);
#endif

/* Resize the surface if VNC screen size has changed */
int new_height = client->height;
int old_height = vnc_client->display->default_surface->height;
int new_width = client->width;
int old_width = vnc_client->display->default_surface->width;
if (
new_height > 0 && new_width > 0
Expand Down
Loading