summaryrefslogtreecommitdiffstats
path: root/src/vdagent-x11-priv.h
diff options
context:
space:
mode:
authorHans de Goede <hdegoede@redhat.com>2013-01-07 20:57:28 +0100
committerHans de Goede <hdegoede@redhat.com>2013-01-07 21:49:09 +0100
commit18771a6b2e99c1252d847dc7f0e274fda9db62ab (patch)
treebda32d7fe98e1c825d7f1ea2f22bbfecf9572d88 /src/vdagent-x11-priv.h
parent407a184050778d2240c5bb50659532ca34318fa3 (diff)
downloadvd_agent-18771a6b2e99c1252d847dc7f0e274fda9db62ab.tar.gz
vd_agent-18771a6b2e99c1252d847dc7f0e274fda9db62ab.tar.xz
vd_agent-18771a6b2e99c1252d847dc7f0e274fda9db62ab.zip
randr: Properly delete old mode in multi-monitor configs
Using x11->width and x11->height to delete the old mode is wrong, since this contains the total screen width and height, not the per monitor width and height. And we must not only delete the mode when replacing it with a new one, but also when disabling the output. Signed-off-by: Hans de Goede <hdegoede@redhat.com>
Diffstat (limited to 'src/vdagent-x11-priv.h')
-rw-r--r--src/vdagent-x11-priv.h9
1 files changed, 9 insertions, 0 deletions
diff --git a/src/vdagent-x11-priv.h b/src/vdagent-x11-priv.h
index a65dcb3..2812c3e 100644
--- a/src/vdagent-x11-priv.h
+++ b/src/vdagent-x11-priv.h
@@ -21,6 +21,9 @@
} \
} while (0)
+/* Same as qxl_dev.h client_monitors_config.heads count */
+#define MONITOR_SIZE_COUNT 64
+
enum { owner_none, owner_guest, owner_client };
/* X11 terminology is confusing a selection request is a request from an
@@ -54,6 +57,11 @@ struct clipboard_format_info {
int atom_count;
};
+struct monitor_size {
+ int width;
+ int height;
+};
+
static const struct clipboard_format_tmpl clipboard_format_templates[] = {
{ VD_AGENT_CLIPBOARD_UTF8_TEXT, { "UTF8_STRING",
"text/plain;charset=UTF-8", "text/plain;charset=utf-8", NULL }, },
@@ -112,6 +120,7 @@ struct vdagent_x11 {
int min_height;
int max_height;
int num_monitors;
+ struct monitor_size monitor_sizes[MONITOR_SIZE_COUNT];
} randr;
/* NB: we cache this assuming the driver isn't changed under our feet */