[virt-tools-list] [PATCH][virt-viewer] Force displays to update geometry when agent connects
Fabiano Fidêncio
fabiano at fidencio.org
Tue Aug 12 23:42:32 UTC 2014
Jonathon,
On Tue, Aug 12, 2014 at 8:31 PM, Jonathon Jongsma <jjongsma at redhat.com>
wrote:
> On Tue, 2014-08-12 at 18:03 +0200, Fabiano Fidêncio wrote:
> > We have to force displays to update geometry when the agent connects to
> > ensure the client will have the guest with the right resolution when the
> > guest has rebooted or the agent has crashed,
>
> Does this fix a particular bug? If so, it should be mentioned here.
>
Thiis patch is not fixing any particular bug we have opened, but a "new"
bug I found while testing stuff for
https://bugzilla.redhat.com/show_bug.cgi?id=1021841
I don't think it's worthwhile mentioning it, but if you prefer, I can do :-)
>
> > ---
> > src/virt-viewer-session-spice.c | 4 ++++
> > src/virt-viewer-session.c | 4 ++++
> > src/virt-viewer-session.h | 1 +
> > 3 files changed, 9 insertions(+)
> >
> > diff --git a/src/virt-viewer-session-spice.c
> b/src/virt-viewer-session-spice.c
> > index b6886be..a27d433 100644
> > --- a/src/virt-viewer-session-spice.c
> > +++ b/src/virt-viewer-session-spice.c
> > @@ -618,6 +618,10 @@ agent_connected_changed(SpiceChannel *cmain
> G_GNUC_UNUSED,
> > {
> > // this will force refresh of application menu
> > g_signal_emit_by_name(self, "session-display-updated");
> > +
> > + /* this will force update displays geometry when the agent has
> connected
> > + * after the application (eg: rebooting the guest) */
> > +
> virt_viewer_session_update_displays_geometry(VIRT_VIEWER_SESSION(self));
> > }
> >
> > static void
> > diff --git a/src/virt-viewer-session.c b/src/virt-viewer-session.c
> > index c432719..d9c84a6 100644
> > --- a/src/virt-viewer-session.c
> > +++ b/src/virt-viewer-session.c
> > @@ -476,6 +476,10 @@ void
> virt_viewer_session_clear_displays(VirtViewerSession *session)
> > session->priv->displays = NULL;
> > }
> >
> > +void virt_viewer_session_update_displays_geometry(VirtViewerSession
> *session)
> > +{
> > + virt_viewer_session_on_monitor_geometry_changed(session, NULL);
> > +}
> >
> >
> > void virt_viewer_session_close(VirtViewerSession *session)
> > diff --git a/src/virt-viewer-session.h b/src/virt-viewer-session.h
> > index 316fdf0..ba0f6b2 100644
> > --- a/src/virt-viewer-session.h
> > +++ b/src/virt-viewer-session.h
> > @@ -107,6 +107,7 @@ void
> virt_viewer_session_add_display(VirtViewerSession *session,
> > void virt_viewer_session_remove_display(VirtViewerSession *session,
> > VirtViewerDisplay *display);
> > void virt_viewer_session_clear_displays(VirtViewerSession *session);
> > +void virt_viewer_session_update_displays_geometry(VirtViewerSession
> *session);
> >
> > void virt_viewer_session_close(VirtViewerSession* session);
> > gboolean virt_viewer_session_open_fd(VirtViewerSession* session, int
> fd);
>
>
> I don't love the name _update_displays_geometry(), but I can't really
> think of anything better at the moment. I think the approach is
> basically correct (unsurprisingly, I suppose, since I suggested it), so
> ACK from me.
>
> _______________________________________________
> virt-tools-list mailing list
> virt-tools-list at redhat.com
> https://www.redhat.com/mailman/listinfo/virt-tools-list
>
Best Regards,
--
Fabiano Fidêncio
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://listman.redhat.com/archives/virt-tools-list/attachments/20140813/f2418d1d/attachment.htm>
More information about the virt-tools-list
mailing list