[virt-tools-list] [PATCH virt-viewer 2/2] Don't create new windows at startup when kiosk mode is false
Marc-André Lureau
marcandre.lureau at gmail.com
Thu Mar 13 14:52:37 UTC 2014
ack
On Thu, Mar 6, 2014 at 11:17 PM, Jonathon Jongsma <jjongsma at redhat.com> wrote:
> virt_viewer_app_set_kiosk creates a new window at startup for each client
> monitor (regardless of whether the guest supports more than one display). This
> seems unnecessary. Only do this if kiosk mode is actually enabled.
> ---
> src/virt-viewer-app.c | 10 +++++-----
> 1 file changed, 5 insertions(+), 5 deletions(-)
>
> diff --git a/src/virt-viewer-app.c b/src/virt-viewer-app.c
> index 484762e..877917e 100644
> --- a/src/virt-viewer-app.c
> +++ b/src/virt-viewer-app.c
> @@ -1387,8 +1387,10 @@ virt_viewer_app_set_kiosk(VirtViewerApp *self, gboolean enabled)
> int i;
>
> self->priv->kiosk = enabled;
> - if (enabled)
> - virt_viewer_app_set_fullscreen(self, enabled);
> + if (!enabled)
> + return;
> +
> + virt_viewer_app_set_fullscreen(self, enabled);
>
> for (i = 0; i < gdk_screen_get_n_monitors(gdk_screen_get_default()); i++) {
> VirtViewerWindow *win = virt_viewer_app_get_nth_window(self, i);
> @@ -1396,9 +1398,7 @@ virt_viewer_app_set_kiosk(VirtViewerApp *self, gboolean enabled)
> if (win == NULL)
> win = virt_viewer_app_window_new(self, i);
>
> - if (enabled)
> - virt_viewer_window_show(win);
> -
> + virt_viewer_window_show(win);
> virt_viewer_window_set_kiosk(win, enabled);
> }
> }
> --
> 1.8.5.3
>
> _______________________________________________
> virt-tools-list mailing list
> virt-tools-list at redhat.com
> https://www.redhat.com/mailman/listinfo/virt-tools-list
--
Marc-André Lureau
More information about the virt-tools-list
mailing list