diff options
author | Marc-André Lureau <marcandre.lureau@redhat.com> | 2013-04-23 14:46:21 +0200 |
---|---|---|
committer | Marc-André Lureau <marcandre.lureau@redhat.com> | 2013-04-26 16:07:24 +0200 |
commit | 6ef2be2d1d87c41270cf2d87378b9d154133fc54 (patch) | |
tree | 3a5d8682419f4201c0d36d0ac451e3804532821c | |
parent | d3f53533a29df73d2dec5933edfbe7f32e6002be (diff) |
main: do not send monitor config if monitor state didn't change
Don't send monitor config after spice_main_set_display_enabled() if the
monitor state didn't change.
This solves monitor "flashing", reconfiguring in a loop:
https://bugzilla.redhat.com/show_bug.cgi?id=952327
-rw-r--r-- | gtk/channel-main.c | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/gtk/channel-main.c b/gtk/channel-main.c index 4c3ae3b..8e79bbd 100644 --- a/gtk/channel-main.c +++ b/gtk/channel-main.c @@ -2610,6 +2610,8 @@ void spice_main_set_display_enabled(SpiceMainChannel *channel, int id, gboolean c->display[i].enabled = enabled; } else { g_return_if_fail(id < G_N_ELEMENTS(c->display)); + if (c->display[id].enabled == enabled) + return; c->display[id].enabled = enabled; } |