qemu vnc screen resize
When the remote segment changes the resolution, a segmentation fault occurs. rfbEncodingExtDesktopSize and qemu do not match. After turning off rfbEncodingExtDesktopSize, the resolution can be changed normally.
###################### libvncclient code:
diff --git a/src/libvncclient/rfbclient.c b/src/libvncclient/rfbclient.c index 6f0afac2..5a73eb47 100644 --- a/src/libvncclient/rfbclient.c +++ b/src/libvncclient/rfbclient.c @@ -1424,8 +1424,8 @@ SetFormatAndEncodings(rfbClient* client) /* New Frame Buffer Size */ if (se->nEncodings < MAX_ENCODINGS && client->canHandleNewFBSize) encs[se->nEncodings++] = rfbClientSwap32IfLE(rfbEncodingNewFBSize);
- if (se->nEncodings < MAX_ENCODINGS)
- encs[se->nEncodings++] = rfbClientSwap32IfLE(rfbEncodingExtDesktopSize);
-
//if (se->nEncodings < MAX_ENCODINGS)
-
// encs[se->nEncodings++] = rfbClientSwap32IfLE(rfbEncodingExtDesktopSize);
/* Last Rect */ if (se->nEncodings < MAX_ENCODINGS && requestLastRectEncoding)
######################### qemu vnc code:
static void vnc_desktop_resize_ext(VncState *vs, int reject_reason) { trace_vnc_msg_server_ext_desktop_resize( vs, vs->ioc, vs->client_width, vs->client_height, reject_reason);
vnc_lock_output(vs);
vnc_write_u8(vs, VNC_MSG_SERVER_FRAMEBUFFER_UPDATE);
vnc_write_u8(vs, 0);
vnc_write_u16(vs, 1); /* number of rects */
vnc_framebuffer_update(vs,
reject_reason ? 1 : 0,
reject_reason,
vs->client_width, vs->client_height,
VNC_ENCODING_DESKTOP_RESIZE_EXT);
vnc_write_u8(vs, 1); /* number of screens */
vnc_write_u8(vs, 0); /* padding */
vnc_write_u8(vs, 0); /* padding */
vnc_write_u8(vs, 0); /* padding */
vnc_write_u32(vs, 0); /* screen id */
vnc_write_u16(vs, 0); /* screen x-pos */
vnc_write_u16(vs, 0); /* screen y-pos */
vnc_write_u16(vs, vs->client_width);
vnc_write_u16(vs, vs->client_height);
vnc_write_u32(vs, 0); /* screen flags */
vnc_unlock_output(vs);
vnc_flush(vs);
}
To follow this ticket :)
To follow this ticket :)
@Neustradamus please refrain from pinging tickets like this, especially for a lot of tickets like you did recently :-) - Please imagine my inbox, I'm involved in all of these. (there is a subscribe button to the right btw). I'm only commenting on this one here not not add more noise for others.
I'm not 100% certain, but this may be related to several pull requests that are open at the moment (#617, #620, and #644, at least), that deal with initializing some additional components of the screen data structure when sending a resize request. I haven't tested with Qemu, but encountered issues when trying to resize on a TigerVNC server.
@cxcel please check again w/ current master after #617 and #620 got merged :-)