[virt-tools-list] [virt-viewer][PATCH] window: Standardize "Leave Fullscreen" behaviour

Jonathon Jongsma jjongsma at redhat.com
Tue Oct 27 14:23:59 UTC 2015


On Tue, 2015-10-27 at 11:55 +0100, Fabiano Fidêncio wrote:
> Historically fullscreen mode used to be an app-level option (you
> could
> only have *all* windows fullscreen or *all* windows non-fullscreen).
> At
> some point per-window fullscreen was introduced, but the startup
> fullscreen remained with the old (app-level) behaviour.
> According to the multimonitor requirements[0], item D5, this
> behaviour
> needs to be changed.
> 
> [0]:
> https://www.redhat.com/archives/virt-tools-list/2015-June/msg00074.ht
> ml
> 
> Resolves: rhbz#1275248
> ---
>  src/virt-viewer-window.c | 7 +------
>  1 file changed, 1 insertion(+), 6 deletions(-)
> 
> diff --git a/src/virt-viewer-window.c b/src/virt-viewer-window.c
> index a1b9940..5d9f3d4 100644
> --- a/src/virt-viewer-window.c
> +++ b/src/virt-viewer-window.c
> @@ -784,12 +784,7 @@
> virt_viewer_window_set_fullscreen(VirtViewerWindow *self,
>      if (fullscreen) {
>          virt_viewer_window_enter_fullscreen(self, -1);
>      } else {
> -        /* leave all windows fullscreen state */
> -        if (virt_viewer_app_get_fullscreen(self->priv->app))
> -            g_object_set(self->priv->app, "fullscreen", FALSE,
> NULL);
> -        /* or just this window */
> -        else
> -            virt_viewer_window_leave_fullscreen(self);
> +        virt_viewer_window_leave_fullscreen(self);
>      }
>  }
>  


I don't think this patch is sufficient. It will leave the
VirtViewerApp::fullscreen property set to true even after the windows
are not fullscreen anymore. This can potentially change behavior since
there are several locations that query this value (e.g.
fullscreen_changed() in virt-viewer-display-spice.c). I think it'd be
best to continue to set the app fullscreen property to false here (and
also add the call to _window_leave_fullscreen()). But then we would
need to change virt_viewer_app_set_fullscreen() to not iterate through
each window and unfullscreen it.

Jonathon




More information about the virt-tools-list mailing list