summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMarc-André Lureau <marcandre.lureau@redhat.com>2012-03-16 23:47:37 +0100
committerMarc-André Lureau <marcandre.lureau@redhat.com>2012-03-18 17:04:53 +0100
commit31248276ff216805a0266edb8242598afcaacbec (patch)
treeb63da93d4cbb16b617a93e7b708d7054b476cc0b
parent0c11bfc9d589e6e1073c34c0b22f4115c9ae37a9 (diff)
Use given color depth in monitor configuration
The main channel only relied on VD_AGENT_DISPLAY_CONFIG_FLAG_SET_COLOR_DEPTH to set color depth when connecting to a guest. However, that doesn't seem to be enough. Instead send given color depth with monitor configuration. Fix --spice-color-depth option not "apparently" working.
-rw-r--r--gtk/channel-main.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/gtk/channel-main.c b/gtk/channel-main.c
index bd64662..50025b0 100644
--- a/gtk/channel-main.c
+++ b/gtk/channel-main.c
@@ -838,7 +838,7 @@ gboolean spice_main_send_monitor_config(SpiceMainChannel *channel)
for (i = 0; i < SPICE_N_ELEMENTS(c->display); i++) {
if (!c->display[i].enabled)
continue;
- mon->monitors[j].depth = 32;
+ mon->monitors[j].depth = c->display_color_depth ? c->display_color_depth : 32;
mon->monitors[j].width = c->display[j].width;
mon->monitors[j].height = c->display[j].height;
mon->monitors[j].x = c->display[j].x;