Revision 621aaeb9 vnc.c
b/vnc.c | ||
---|---|---|
522 | 522 |
buffer->offset += len; |
523 | 523 |
} |
524 | 524 |
|
525 |
static void vnc_desktop_resize(VncState *vs) |
|
526 |
{ |
|
527 |
DisplayState *ds = vs->ds; |
|
528 |
|
|
529 |
if (vs->csock == -1 || !vnc_has_feature(vs, VNC_FEATURE_RESIZE)) { |
|
530 |
return; |
|
531 |
} |
|
532 |
vnc_write_u8(vs, VNC_MSG_SERVER_FRAMEBUFFER_UPDATE); |
|
533 |
vnc_write_u8(vs, 0); |
|
534 |
vnc_write_u16(vs, 1); /* number of rects */ |
|
535 |
vnc_framebuffer_update(vs, 0, 0, ds_get_width(ds), ds_get_height(ds), |
|
536 |
VNC_ENCODING_DESKTOPRESIZE); |
|
537 |
vnc_flush(vs); |
|
538 |
} |
|
539 |
|
|
525 | 540 |
static void vnc_dpy_resize(DisplayState *ds) |
526 | 541 |
{ |
527 | 542 |
int size_changed; |
... | ... | |
550 | 565 |
QTAILQ_FOREACH(vs, &vd->clients, next) { |
551 | 566 |
vnc_colordepth(vs); |
552 | 567 |
if (size_changed) { |
553 |
if (vs->csock != -1 && vnc_has_feature(vs, VNC_FEATURE_RESIZE)) { |
|
554 |
vnc_write_u8(vs, VNC_MSG_SERVER_FRAMEBUFFER_UPDATE); |
|
555 |
vnc_write_u8(vs, 0); |
|
556 |
vnc_write_u16(vs, 1); /* number of rects */ |
|
557 |
vnc_framebuffer_update(vs, 0, 0, ds_get_width(ds), ds_get_height(ds), |
|
558 |
VNC_ENCODING_DESKTOPRESIZE); |
|
559 |
vnc_flush(vs); |
|
560 |
} |
|
568 |
vnc_desktop_resize(vs); |
|
561 | 569 |
} |
562 | 570 |
if (vs->vd->cursor) { |
563 | 571 |
vnc_cursor_define(vs); |
Also available in: Unified diff