[Spice-devel] [PATCH] randr: Make resolution changing more robust
Uri Lublin
uril at redhat.com
Mon Jan 20 09:59:46 PST 2014
On 01/20/2014 06:43 PM, Christophe Fergeau wrote:
> diff --git a/src/vdagent-x11-randr.c b/src/vdagent-x11-randr.c
> + /* ... and disable the ones that would be bigger than
> + * the new RandR screen once it is resized. If they are enabled the
> + * XRRSetScreenSize call will fail with BadMatch. They will be
> + * reenabled after hanging the screen size.
> + */
> + for (i = 0; i < curr->num_of_monitors; ++i) {
> + int width, height;
> + int x, y;
> +
> + width = curr->monitors[i].width;
> + height = curr->monitors[i].height;
> + x = curr->monitors[i].x;
> + y = curr->monitors[i].y;
> +
> + if ((x + width > primary_w) || (y + height > primary_h)) {
> + if (x11->debug)
> + syslog(LOG_DEBUG, "Disabling monitor %d: "
> + "(%d+%d, %d+%d) < (%d,%d)",
Replace '<' with '>'
> + i, x, width, y, height, primary_w, primary_h);
> +
> + xrandr_disable_output(x11, i);
> + continue;
> }
> }
>
More information about the Spice-devel
mailing list