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

Re: [virt-tools-list] [PATCH] virt-viewer-app: Always allow users to close displays from the displays menu


On 03/29/2013 12:00 AM, Marc-André Lureau wrote:

----- Mensaje original -----
Marking display menu items as non sensitive for shown displays make
no sense,
since the user can always close them through the window-manager.

Having a window for a display shown when the display is not
selectable nor
ready, can happen when the agent goes away. This happens for example
when using
a dual monitor config with a Linux guest and then switching to a text
inside the guest.

But then the display should be READY.

No the 2nd display becomes not READY when you switch to a text-console
inside a Linux guest, and then as said you end up with the inconsistent
case where you cannot close the display true to the menu, but you can
close it just fine through the client window-manager.

Signed-off-by: Hans de Goede <hdegoede redhat com>
  src/virt-viewer-app.c | 4 ++--
  1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/src/virt-viewer-app.c b/src/virt-viewer-app.c
index a05941b..3fd7613 100644
--- a/src/virt-viewer-app.c
+++ b/src/virt-viewer-app.c
@@ -1822,7 +1822,7 @@ window_update_menu_displays_cb(gpointer key
          VirtViewerWindow *vwin =
          VirtViewerDisplay *display =
          GtkWidget *item;
-        gboolean visible, sensitive = FALSE;
+        gboolean visible, sensitive;
          gchar *label;

          label = g_strdup_printf(_("Display %d"), *nth + 1);
@@ -1832,6 +1832,7 @@ window_update_menu_displays_cb(gpointer key
          visible =

+        sensitive = visible;

So if it's not visible, it's insensitive? I should be able to show it back, even if the agent is not running. Only it needs to be READY.

No if it is not visible sensitive starts false (just as it did before this patch), but it
still gets set to true if READY is in show_hints, or if the display is selectable.



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