summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMarc-André Lureau <marcandre.lureau@redhat.com>2012-07-05 01:29:44 +0200
committerMarc-André Lureau <marcandre.lureau@redhat.com>2012-07-16 17:46:41 +0200
commitfdb8813a438d801368f9521253f44cc12061d4dd (patch)
treeb00fae18f9973ef22f58c02d8f9ff013e50df824
parent2a2900267f4f1b94213e856c793509d897cb50cd (diff)
Enable the display early when the widget is created0.12.101
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..
-rw-r--r--gtk/spice-widget.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/gtk/spice-widget.c b/gtk/spice-widget.c
index 5c12db9..02bb089 100644
--- a/gtk/spice-widget.c
+++ b/gtk/spice-widget.c
@@ -1790,7 +1790,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);
}
@@ -1963,6 +1962,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;
}