[PATCH spice-gtk] main: do not send monitor config if monitor state didn't change

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



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

_______________________________________________
Spice-devel mailing list
Spice-devel@xxxxxxxxxxxxxxxxxxxxx
http://lists.freedesktop.org/mailman/listinfo/spice-devel




[Index of Archives]     [Linux ARM Kernel]     [Linux ARM]     [Linux Omap]     [Fedora ARM]     [IETF Annouce]     [Security]     [Bugtraq]     [Linux]     [Linux OMAP]     [Linux MIPS]     [ECOS]     [Asterisk Internet PBX]     [Linux API]     [Monitors]