diff options
author | Pavel Grunt <pgrunt@redhat.com> | 2016-03-16 14:46:51 +0100 |
---|---|---|
committer | Pavel Grunt <pgrunt@redhat.com> | 2016-03-17 08:18:37 +0100 |
commit | c0c721bbaae50d3ad1991d22df1c4397f24f7acb (patch) | |
tree | e19c3925d29f73b596e49c1f0aff82860a631368 | |
parent | 3c6b4ae867802ca050ed904ad80be8bffe40b1c3 (diff) | |
download | spice-gtk-c0c721bbaae50d3ad1991d22df1c4397f24f7acb.tar.gz spice-gtk-c0c721bbaae50d3ad1991d22df1c4397f24f7acb.tar.xz spice-gtk-c0c721bbaae50d3ad1991d22df1c4397f24f7acb.zip |
display: Lower level of warning for empty monitor config
It is a valid case when a guest requests to turn off monitors, eg:
xrandr --output Virtual-0 --off
Related:
https://bugzilla.redhat.com/show_bug.cgi?id=1061942
Acked-by: Frediano Ziglio <fziglio@redhat.com>
-rw-r--r-- | src/channel-display.c | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/src/channel-display.c b/src/channel-display.c index cdaba9d..f576679 100644 --- a/src/channel-display.c +++ b/src/channel-display.c @@ -1813,7 +1813,11 @@ static void display_handle_monitors_config(SpiceChannel *channel, SpiceMsgIn *in guint i; g_return_if_fail(config != NULL); - g_return_if_fail(config->count > 0); + + if (config->count == 0) { + CHANNEL_DEBUG(channel, "received empty monitor config"); + return; + } CHANNEL_DEBUG(channel, "received new monitors config from guest: n: %d/%d", config->count, config->max_allowed); |