[virt-tools-list] [PATCH virt-viewer] Enable the display before showing the window
Jonathon Jongsma
jjongsma at redhat.com
Fri Dec 13 18:22:23 UTC 2013
Yes, this doesn't affect initial resolutions at all. All initial displays are already enabled, so virt_viewer_display_set_enabled() is essentially a NOOP. So for initial displays, whether this call happens before or after the call to gtk_widget_show() doesn't make any difference.
----- Original Message -----
> From: "Marc-André Lureau" <mlureau at redhat.com>
> To: "Jonathon Jongsma" <jjongsma at redhat.com>
> Cc: virt-tools-list at redhat.com
> Sent: Friday, December 13, 2013 11:11:39 AM
> Subject: Re: [virt-tools-list] [PATCH virt-viewer] Enable the display before showing the window
>
>
>
> ----- Original Message -----
> > This ensures that the display is enabled when it gets its first Allocate
> > event
> > (which causes a display reconfiguration). If the display is not enabled at
> > this
> > point, it won't send down a new monitors_config message until the second
> > allocation, which may result in the display being disabled until a window
> > is
> > resized.
>
> When starting, is the current guest resolution kept with this patch?
>
> > ---
> > src/virt-viewer-window.c | 4 ++--
> > 1 file changed, 2 insertions(+), 2 deletions(-)
> >
> > diff --git a/src/virt-viewer-window.c b/src/virt-viewer-window.c
> > index af4d0bc..05d5fe7 100644
> > --- a/src/virt-viewer-window.c
> > +++ b/src/virt-viewer-window.c
> > @@ -1299,11 +1299,11 @@ virt_viewer_window_enable_kiosk(VirtViewerWindow
> > *self)
> > void
> > virt_viewer_window_show(VirtViewerWindow *self)
> > {
> > - gtk_widget_show(self->priv->window);
> > -
> > if (self->priv->display)
> > virt_viewer_display_set_enabled(self->priv->display, TRUE);
> >
> > + gtk_widget_show(self->priv->window);
> > +
> > if (self->priv->desktop_resize_pending) {
> > virt_viewer_window_resize(self, FALSE);
> > self->priv->desktop_resize_pending = FALSE;
> > --
> > 1.8.3.1
> >
> > _______________________________________________
> > virt-tools-list mailing list
> > virt-tools-list at redhat.com
> > https://www.redhat.com/mailman/listinfo/virt-tools-list
> >
>
More information about the virt-tools-list
mailing list