[PATCH spice-gtk 25/25] Enable the display early when the widget is created

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

 



The  spice_main_set_display_enabled() function  is  used  to mark  the
display/monitor  config  as  enabled.  In  order  to  simplify  client
implementation, the widget enables  the matching display automatically
when the channel mark is received. This is only for legacy reason, and
my lack  of understanding at  that time. It  could as well  be enabled
earlier, when the widget is created.  It wasn't really a good decision
to disable monitor when the mark is off, which can be toggled when the
primary surface is resize for example, and can cause some races..
---
 gtk/spice-widget.c |    2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/gtk/spice-widget.c b/gtk/spice-widget.c
index a874fd4..e4a7136 100644
--- a/gtk/spice-widget.c
+++ b/gtk/spice-widget.c
@@ -1781,7 +1781,6 @@ static void mark(SpiceDisplay *display, gint mark)
 
     SPICE_DEBUG("widget mark: %d, %d:%d %p", mark, d->channel_id, d->monitor_id, display);
     d->mark = mark;
-    spice_main_set_display_enabled(d->main, get_display_id(display), d->mark != 0);
     update_ready(display);
 }
 
@@ -1954,6 +1953,7 @@ static void channel_new(SpiceSession *s, SpiceChannel *channel, gpointer data)
             mark(display, primary.marked);
         }
         spice_channel_connect(channel);
+        spice_main_set_display_enabled(d->main, get_display_id(display), TRUE);
         return;
     }
 
-- 
1.7.10.4

_______________________________________________
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]