[Spice-devel] [spice-gtk] main: Don't delay update_display_timer(0) for up to 1 second
Christophe Fergeau
cfergeau at redhat.com
Wed May 25 17:12:07 UTC 2016
On Wed, May 25, 2016 at 12:31:09PM -0400, Marc-André Lureau wrote:
> >
> > When this happens, we inform the server that only one monitor is active,
> > then the server sends a MonitorsConfig message with 2 monitors (first
> > request we sent), and then with just 1 monitor (second request we sent).
> >
> > This causes remote-viewer to show one fullscreen black window indicating
> > "Connected to server" on one monitor and a working fullscreen window on
> > the second monitor.
> >
> > update_display_timer(0) schedules a timeout to be run with
> > g_timeout_add_seconds(0). However, g_timeout_add_seconds() schedules
> > timers with a granularity of a second, so the timeout we scheduled with
> > g_timeout_add_seconds() may fire up to 1 second later than when we
> > called it, while we really wanted it to fire as soon as possible.
>
> Why not call timer_set_display() there in this particular case?
This can be called in coroutine context, not sure timer_set_display()
can cope with that.
Christophe
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 819 bytes
Desc: not available
URL: <https://lists.freedesktop.org/archives/spice-devel/attachments/20160525/fcebfd70/attachment.sig>
More information about the Spice-devel
mailing list