|
@@ -608,6 +608,11 @@ static int vnc_width(VncDisplay *vd)
|
|
VNC_DIRTY_PIXELS_PER_BIT));
|
|
VNC_DIRTY_PIXELS_PER_BIT));
|
|
}
|
|
}
|
|
|
|
|
|
|
|
+static int vnc_true_width(VncDisplay *vd)
|
|
|
|
+{
|
|
|
|
+ return MIN(VNC_MAX_WIDTH, surface_width(vd->ds));
|
|
|
|
+}
|
|
|
|
+
|
|
static int vnc_height(VncDisplay *vd)
|
|
static int vnc_height(VncDisplay *vd)
|
|
{
|
|
{
|
|
return MIN(VNC_MAX_HEIGHT, surface_height(vd->ds));
|
|
return MIN(VNC_MAX_HEIGHT, surface_height(vd->ds));
|
|
@@ -691,16 +696,16 @@ static void vnc_desktop_resize(VncState *vs)
|
|
!vnc_has_feature(vs, VNC_FEATURE_RESIZE_EXT))) {
|
|
!vnc_has_feature(vs, VNC_FEATURE_RESIZE_EXT))) {
|
|
return;
|
|
return;
|
|
}
|
|
}
|
|
- if (vs->client_width == pixman_image_get_width(vs->vd->server) &&
|
|
|
|
|
|
+ if (vs->client_width == vs->vd->true_width &&
|
|
vs->client_height == pixman_image_get_height(vs->vd->server)) {
|
|
vs->client_height == pixman_image_get_height(vs->vd->server)) {
|
|
return;
|
|
return;
|
|
}
|
|
}
|
|
|
|
|
|
- assert(pixman_image_get_width(vs->vd->server) < 65536 &&
|
|
|
|
- pixman_image_get_width(vs->vd->server) >= 0);
|
|
|
|
|
|
+ assert(vs->vd->true_width < 65536 &&
|
|
|
|
+ vs->vd->true_width >= 0);
|
|
assert(pixman_image_get_height(vs->vd->server) < 65536 &&
|
|
assert(pixman_image_get_height(vs->vd->server) < 65536 &&
|
|
pixman_image_get_height(vs->vd->server) >= 0);
|
|
pixman_image_get_height(vs->vd->server) >= 0);
|
|
- vs->client_width = pixman_image_get_width(vs->vd->server);
|
|
|
|
|
|
+ vs->client_width = vs->vd->true_width;
|
|
vs->client_height = pixman_image_get_height(vs->vd->server);
|
|
vs->client_height = pixman_image_get_height(vs->vd->server);
|
|
|
|
|
|
if (vnc_has_feature(vs, VNC_FEATURE_RESIZE_EXT)) {
|
|
if (vnc_has_feature(vs, VNC_FEATURE_RESIZE_EXT)) {
|
|
@@ -774,6 +779,7 @@ static void vnc_update_server_surface(VncDisplay *vd)
|
|
|
|
|
|
width = vnc_width(vd);
|
|
width = vnc_width(vd);
|
|
height = vnc_height(vd);
|
|
height = vnc_height(vd);
|
|
|
|
+ vd->true_width = vnc_true_width(vd);
|
|
vd->server = pixman_image_create_bits(VNC_SERVER_FB_FORMAT,
|
|
vd->server = pixman_image_create_bits(VNC_SERVER_FB_FORMAT,
|
|
width, height,
|
|
width, height,
|
|
NULL, 0);
|
|
NULL, 0);
|
|
@@ -809,13 +815,22 @@ static void vnc_dpy_switch(DisplayChangeListener *dcl,
|
|
vd->guest.fb = pixman_image_ref(surface->image);
|
|
vd->guest.fb = pixman_image_ref(surface->image);
|
|
vd->guest.format = surface->format;
|
|
vd->guest.format = surface->format;
|
|
|
|
|
|
|
|
+
|
|
if (pageflip) {
|
|
if (pageflip) {
|
|
|
|
+ trace_vnc_server_dpy_pageflip(vd,
|
|
|
|
+ surface_width(surface),
|
|
|
|
+ surface_height(surface),
|
|
|
|
+ surface_format(surface));
|
|
vnc_set_area_dirty(vd->guest.dirty, vd, 0, 0,
|
|
vnc_set_area_dirty(vd->guest.dirty, vd, 0, 0,
|
|
surface_width(surface),
|
|
surface_width(surface),
|
|
surface_height(surface));
|
|
surface_height(surface));
|
|
return;
|
|
return;
|
|
}
|
|
}
|
|
|
|
|
|
|
|
+ trace_vnc_server_dpy_recreate(vd,
|
|
|
|
+ surface_width(surface),
|
|
|
|
+ surface_height(surface),
|
|
|
|
+ surface_format(surface));
|
|
/* server surface */
|
|
/* server surface */
|
|
vnc_update_server_surface(vd);
|
|
vnc_update_server_surface(vd);
|
|
|
|
|