[Spice-devel] [PATCH spice-gtk] main: do not send monitor config if monitor state didn't change
Marc-André Lureau
marcandre.lureau at gmail.com
Tue Apr 23 05:48:55 PDT 2013
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
---
gtk/channel-main.c | 2 ++
1 file changed, 2 insertions(+)
diff --git a/gtk/channel-main.c b/gtk/channel-main.c
index 6d31ef5..3e63ea7 100644
--- a/gtk/channel-main.c
+++ b/gtk/channel-main.c
@@ -2299,6 +2299,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;
}
--
1.8.2.1.342.gfa7285d
More information about the Spice-devel
mailing list