[virt-tools-list] [PATCH virt-viewer 2/6] Only fullscreen the new window

Marc-André Lureau marcandre.lureau at gmail.com
Thu May 16 19:52:52 UTC 2013


small mistake below

On Thu, May 16, 2013 at 9:33 PM, Marc-André Lureau <
marcandre.lureau at gmail.com> wrote:

> From: Marc-André Lureau <marcandre.lureau at redhat.com>
>
> The current code will forcefully reset fullscreen all windows
> when a new window is created
> ---
>  src/virt-viewer-app.c | 39 +++++++++++++++++++++++++--------------
>  1 file changed, 25 insertions(+), 14 deletions(-)
>
> diff --git a/src/virt-viewer-app.c b/src/virt-viewer-app.c
> index 853615e..62e3603 100644
> --- a/src/virt-viewer-app.c
> +++ b/src/virt-viewer-app.c
> @@ -632,6 +632,24 @@ viewer_window_focus_out_cb(GtkWindow *window
> G_GNUC_UNUSED,
>      return FALSE;
>  }
>
> +static void
> +app_window_try_fullscreen(VirtViewerApp *self, VirtViewerWindow *win,
> gint nth)
> +{
> +    GdkScreen *screen = gdk_screen_get_default();
> +    gboolean move =
> +        virt_viewer_app_get_n_windows_visible(self) > 1 ||
> +        self->priv->fullscreen_auto_conf;
> +
> +    if (!move)
> +        nth = -1;
> +    else if (nth >= gdk_screen_get_n_monitors(screen)) {
> +        DEBUG_LOG("skipping display %d", nth);
> +        return;
> +    }
> +
> +    virt_viewer_window_enter_fullscreen(win, nth);
> +}
> +
>  static VirtViewerWindow*
>  virt_viewer_app_window_new(VirtViewerApp *self, GtkWidget *container,
> gint nth)
>  {
> @@ -645,10 +663,9 @@ virt_viewer_app_window_new(VirtViewerApp *self,
> GtkWidget *container, gint nth)
>      if (self->priv->main_window)
>          virt_viewer_window_set_zoom_level(window,
> virt_viewer_window_get_zoom_level(self->priv->main_window));
>      virt_viewer_app_set_nth_window(self, nth, window);
> -    w = virt_viewer_window_get_window(window);
>

+    if (self->priv->fullscreen)


> +    app_window_try_fullscreen(self, window, nth);
>


-- 
Marc-André Lureau
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://listman.redhat.com/archives/virt-tools-list/attachments/20130516/04b02387/attachment.htm>


More information about the virt-tools-list mailing list