Re: [PATCH virt-viewer] Allow to fullscreen and position display independently

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Hi,

I have one issue with this patch, it decouples the virt-viewer-window's
fullscreen state from the virt-viewer-app's fullscreen state.

This leads for example to the following undesirable situation:
1) user starts virt-viewer with --full-screen=auto-conf
2) Linux guest is booting, so only a single virt_viewer_window gets
   created
3) VM reaches X, which triggers virt_viewer_session_spice_display_monitors
   with monitors_max > 1
4) virt_viewer_app_window_new gets called for the extra monitors, calling
   virt_viewer_app_set_fullscreen which re fullscreens the initial window

So I believe that if we do this we should rename the fullscreen state in
virt-viewer-app to "initial-window-state", indicating that it is a setting
applied only when a window first shows, and remove the looping over all
windows from virt_viewer_app_set_fullscreen, instead only applying the
state to the window being created from virt_viewer_app_window_new.

While making this change, I would like to also see the auto-conf setting
merged into the initial-window-state, so intial-window-state would be a
gint mapping to:

enum {
    INITIAL_WINDOW_STATE_WINDOWED,
    INITIAL_WINDOW_STATE_FULLSCREEN,
    INITIAL_WINDOW_STATE_FULLSCREEN_AUTO_CONF
};

Thereby properly reflecting the 3 initial states we have, rather then having
2 gbooleans coding 4 states of which 1 is never used.

This whole removal of having a single fullscreen state (which now no longer is
true) in virt-viewer-app, and generic cleanup of the fullscreen handling
in virt-viewer-app, is IMHO best done in a separate patch, so ACK for this
patch.

Regards,

Hans



On 05/08/2013 08:24 PM, Marc-André Lureau wrote:

Currently, going from window to fullscreen mode changes all display to
fullscreen and realize automatic positionning on corresponding client
monitor. However, it allows for much more flexibility to allow entering
fullscreen on the current monitor each windows seperately. This way the
user can decide on arbitrary monitor arrangement.

https://bugzilla.redhat.com/show_bug.cgi?id=558241
---
  src/virt-viewer-window.c | 5 ++++-
  1 file changed, 4 insertions(+), 1 deletion(-)

diff --git a/src/virt-viewer-window.c b/src/virt-viewer-window.c
index c9e1ada..5c9a9db 100644
--- a/src/virt-viewer-window.c
+++ b/src/virt-viewer-window.c
@@ -752,7 +752,10 @@ virt_viewer_window_menu_view_fullscreen(GtkWidget *menu,
  {
      gboolean fullscreen = gtk_check_menu_item_get_active(GTK_CHECK_MENU_ITEM(menu));

-    g_object_set(self->priv->app, "fullscreen", fullscreen, NULL);
+    if (fullscreen)
+        virt_viewer_window_enter_fullscreen(self, -1);
+    else
+        virt_viewer_window_leave_fullscreen(self);
  }

  G_MODULE_EXPORT void


_______________________________________________
virt-tools-list mailing list
virt-tools-list@xxxxxxxxxx
https://www.redhat.com/mailman/listinfo/virt-tools-list





[Index of Archives]     [Linux Virtualization]     [KVM Development]     [CentOS Virtualization]     [Netdev]     [Ethernet Bridging]     [Linux Wireless]     [Kernel Newbies]     [Security]     [Linux for Hams]     [Netfilter]     [Bugtraq]     [Yosemite Forum]     [MIPS Linux]     [ARM Linux]     [Linux RAID]     [Linux Admin]     [Samba]     [Video 4 Linux]

  Powered by Linux