Skip to content

Commit

Permalink
libvncclient: Maintain screen data when sending ExtendedDesktopSize
Browse files Browse the repository at this point in the history
  • Loading branch information
necouchman committed Jun 1, 2024
1 parent b44665c commit 4d04235
Showing 1 changed file with 8 additions and 0 deletions.
8 changes: 8 additions & 0 deletions src/libvncclient/rfbclient.c
Original file line number Diff line number Diff line change
Expand Up @@ -1715,6 +1715,14 @@ SendExtDesktopSize(rfbClient* client, uint16_t width, uint16_t height)
sdm.width = rfbClientSwap16IfLE(width);
sdm.height = rfbClientSwap16IfLE(height);
sdm.numberOfScreens = 1;

/* Copy existing screen information to send with update. */
screen.id = client->screen.id;
screen.x = client->screen.x;
screen.y = client->screen.y;
screen.flags = client->screen.flags;

/* Get updated width and height for the resize. */
screen.width = rfbClientSwap16IfLE(width);
screen.height = rfbClientSwap16IfLE(height);

Expand Down

0 comments on commit 4d04235

Please sign in to comment.