From 007948e614559ba7cd8894abd7b9213b0ab37861 Mon Sep 17 00:00:00 2001 From: Hans de Goede Date: Jan 08 2013 11:41:00 +0000 Subject: New upstream release 0.12.1 - Fixes various issues with dynamic monitor / resolution support --- diff --git a/.gitignore b/.gitignore index 67adec9..efea616 100644 --- a/.gitignore +++ b/.gitignore @@ -4,3 +4,4 @@ /spice-vdagent-0.10.0.tar.bz2 /spice-vdagent-0.10.1.tar.bz2 /spice-vdagent-0.12.0.tar.bz2 +/spice-vdagent-0.12.1.tar.bz2 diff --git a/0001-x11-randr-Fix-setting-of-mode-on-non-arbitrary-resol.patch b/0001-x11-randr-Fix-setting-of-mode-on-non-arbitrary-resol.patch deleted file mode 100644 index 176d681..0000000 --- a/0001-x11-randr-Fix-setting-of-mode-on-non-arbitrary-resol.patch +++ /dev/null @@ -1,122 +0,0 @@ -From 3fdfcbc6eb684e25da2eea22d26f223d40fc135d Mon Sep 17 00:00:00 2001 -From: Hans de Goede -Date: Wed, 10 Oct 2012 10:45:37 +0200 -Subject: [PATCH 1/2] x11-randr: Fix setting of mode on non arbitrary - resolution capable X driver - -Signed-off-by: Hans de Goede ---- - src/vdagent-x11-randr.c | 28 +++++++++++++++++++--------- - 1 file changed, 19 insertions(+), 9 deletions(-) - -diff --git a/src/vdagent-x11-randr.c b/src/vdagent-x11-randr.c -index 33435b1..d2d0153 100644 ---- a/src/vdagent-x11-randr.c -+++ b/src/vdagent-x11-randr.c -@@ -173,7 +173,7 @@ find_mode_by_size (struct vdagent_x11 *x11, int width, int height) - return ret; - } - --static void delete_mode(struct vdagent_x11 *x11, int output_index, const char *name) -+static void delete_mode(struct vdagent_x11 *x11, int output_index) - { - int m; - XRRModeInfo *mode; -@@ -181,6 +181,7 @@ static void delete_mode(struct vdagent_x11 *x11, int output_index, const char *n - XRRCrtcInfo *crtc_info; - RRCrtc crtc; - int current_mode = -1; -+ char name[20]; - - output_info = x11->randr.outputs[output_index]; - if (output_info->ncrtc != 1) { -@@ -191,6 +192,7 @@ static void delete_mode(struct vdagent_x11 *x11, int output_index, const char *n - crtc_info = crtc_from_id(x11, output_info->crtcs[0]); - current_mode = crtc_info->mode; - crtc = output_info->crtc; -+ snprintf(name, sizeof(name), "vdagent-%d", output_index); - for (m = 0 ; m < x11->randr.res->nmode; ++m) { - mode = &x11->randr.res->modes[m]; - if (strcmp(mode->name, name) == 0) -@@ -293,7 +295,7 @@ static XRRModeInfo *create_new_mode(struct vdagent_x11 *x11, int output_index, - /* we may be using this mode from an old invocation - check first */ - snprintf(modename, sizeof(modename), "vdagent-%d", output_index); - arm_error_handler(x11); -- delete_mode(x11, output_index, modename); -+ delete_mode(x11, output_index); - check_error_handler(x11); - if (x11->set_crtc_config_not_functional) { - return NULL; -@@ -325,9 +327,8 @@ static int xrandr_add_and_set(struct vdagent_x11 *x11, int output, int x, int y, - return 0; - } - if (x11->set_crtc_config_not_functional) { -- /* succeed without doing anything. set_best_mode will -- * find something close. */ -- return 1; -+ /* fail, set_best_mode will find something close. */ -+ return 0; - } - xid = x11->randr.res->outputs[output]; - mode = find_mode_by_size(x11, width, height); -@@ -338,14 +339,15 @@ static int xrandr_add_and_set(struct vdagent_x11 *x11, int output, int x, int y, - syslog(LOG_ERR, "failed to add a new mode"); - return 0; - } -- XRRAddOutputMode(x11->display, xid, mode->id); // Call this anyway? -+ XRRAddOutputMode(x11->display, xid, mode->id); - outputs[0] = xid; - s = XRRSetCrtcConfig(x11->display, x11->randr.res, x11->randr.res->crtcs[output], - CurrentTime, x, y, mode->id, RR_Rotate_0, outputs, - 1); - if (s != RRSetConfigSuccess) { - syslog(LOG_ERR, "failed to XRRSetCrtcConfig"); -- // TODO - return crtc config to default -+ delete_mode(x11, output); -+ x11->set_crtc_config_not_functional = 1; - return 0; - } - return 1; -@@ -384,6 +386,8 @@ static int set_screen_to_best_size(struct vdagent_x11 *x11, int width, int heigh - syslog(LOG_ERR, "XRRSizes failed"); - return 0; - } -+ if (x11->debug) -+ syslog(LOG_DEBUG, "set_screen_to_best_size found %d modes\n", num_sizes); - - /* Find the closest size which will fit within the monitor */ - for (i = 0; i < num_sizes; i++) { -@@ -415,6 +419,9 @@ static int set_screen_to_best_size(struct vdagent_x11 *x11, int width, int heigh - rotation, CurrentTime); - XRRFreeScreenConfigInfo(config); - -+ if (x11->debug) -+ syslog(LOG_DEBUG, "set_screen_to_best_size set size to: %dx%d\n", -+ sizes[best].width, sizes[best].height); - *out_width = sizes[best].width; - *out_height = sizes[best].height; - return 1; -@@ -648,8 +655,10 @@ void vdagent_x11_set_monitor_config(struct vdagent_x11 *x11, - x = mon_config->monitors[i].x; - y = mon_config->monitors[i].y; - if (!xrandr_add_and_set(x11, i, x, y, width, height) && -- mon_config->num_of_monitors == 1) { -- set_screen_to_best_size(x11, width, height, &width, &height); -+ mon_config->num_of_monitors == 1) { -+ set_screen_to_best_size(x11, width, height, -+ &primary_w, &primary_h); -+ goto update; - } - } - -@@ -661,6 +670,7 @@ void vdagent_x11_set_monitor_config(struct vdagent_x11 *x11, - check_error_handler(x11); - } - -+update: - update_randr_res(x11); - x11->width = primary_w; - x11->height = primary_h; --- -1.7.12.1 - diff --git a/0002-Fix-running-on-a-vm-with-multiple-qxl-devs-without-X.patch b/0002-Fix-running-on-a-vm-with-multiple-qxl-devs-without-X.patch deleted file mode 100644 index ae5a4b0..0000000 --- a/0002-Fix-running-on-a-vm-with-multiple-qxl-devs-without-X.patch +++ /dev/null @@ -1,42 +0,0 @@ -From 1d32f9f136ae5a6456bfe7834d16336523ad444b Mon Sep 17 00:00:00 2001 -From: Hans de Goede -Date: Wed, 10 Oct 2012 10:46:57 +0200 -Subject: [PATCH 2/2] Fix running on a vm with multiple qxl devs without - Xinerama (rhbz#855110) - -In this case the client will always send info for qxl-devs monitors, and -set unused monitors to 0x0, deal properly with this, otherwise the -mouse ends up confused. - -Signed-off-by: Hans de Goede ---- - src/vdagent-x11-randr.c | 13 +++++++++---- - 1 file changed, 9 insertions(+), 4 deletions(-) - -diff --git a/src/vdagent-x11-randr.c b/src/vdagent-x11-randr.c -index d2d0153..bed44af 100644 ---- a/src/vdagent-x11-randr.c -+++ b/src/vdagent-x11-randr.c -@@ -549,10 +549,15 @@ int same_monitor_configs(struct vdagent_x11 *x11, VDAgentMonitorsConfig *mon) - } - - if (mon->num_of_monitors > res->noutput) { -- syslog(LOG_ERR, -- "error: unexpected client request: #mon %d > driver output %d", -- mon->num_of_monitors, res->noutput); -- return 0; -+ for (i = res->noutput; i < mon->num_of_monitors; i++) { -+ if (mon->monitors[i].width || mon->monitors[i].height) { -+ syslog(LOG_WARNING, -+ "warning: unexpected client request: #mon %d > driver output %d", -+ mon->num_of_monitors, res->noutput); -+ break; -+ } -+ } -+ mon->num_of_monitors = res->noutput; - } - - for (i = 0 ; i < mon->num_of_monitors; ++i) { --- -1.7.12.1 - diff --git a/sources b/sources index 9fce35a..1abdf99 100644 --- a/sources +++ b/sources @@ -1 +1 @@ -a7de4d6682099b7af9c289ef3e2996f7 spice-vdagent-0.12.0.tar.bz2 +1a5c8a72b0ee5dee65bf3419151d0c2c spice-vdagent-0.12.1.tar.bz2 diff --git a/spice-vdagent.spec b/spice-vdagent.spec index 6937d66..7e42cd7 100644 --- a/spice-vdagent.spec +++ b/spice-vdagent.spec @@ -1,13 +1,11 @@ Name: spice-vdagent -Version: 0.12.0 -Release: 2%{?dist} +Version: 0.12.1 +Release: 1%{?dist} Summary: Agent for Spice guests Group: Applications/System License: GPLv3+ URL: http://spice-space.org/ Source0: http://spice-space.org/download/releases/%{name}-%{version}.tar.bz2 -Patch1: 0001-x11-randr-Fix-setting-of-mode-on-non-arbitrary-resol.patch -Patch2: 0002-Fix-running-on-a-vm-with-multiple-qxl-devs-without-X.patch BuildRequires: systemd-devel spice-protocol libpciaccess-devel BuildRequires: libXrandr-devel libXinerama-devel libXfixes-devel BuildRequires: systemd-units desktop-file-utils @@ -30,17 +28,15 @@ Features: %prep %setup -q -%patch1 -p1 -%patch2 -p1 %build %configure --with-session-info=systemd --with-init-script=systemd -make %{?_smp_mflags} +make %{?_smp_mflags} V=2 %install -make install DESTDIR=$RPM_BUILD_ROOT +make install DESTDIR=$RPM_BUILD_ROOT V=2 %post @@ -71,6 +67,10 @@ make install DESTDIR=$RPM_BUILD_ROOT %changelog +* Tue Jan 8 2013 Hans de Goede - 0.12.1-1 +- New upstream release 0.12.1 +- Fixes various issues with dynamic monitor / resolution support + * Mon Nov 12 2012 Hans de Goede - 0.12.0-2 - Fix setting of mode on non arbitrary resolution capable X driver - Fix wrong mouse coordinates on vms with multiple qxl devices