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

[virt-tools-list] [PATCH virt-viewer 1/6] window: leave fullscreen on current window



Since fdaa9b0ca, virt-viewer allows to fullscreen a single window. It
feels more symetric to leave a single window from fullscreen as well,
unless the application was started in fullscreen.
---
 src/virt-viewer-window.c | 7 ++++++-
 1 file changed, 6 insertions(+), 1 deletion(-)

diff --git a/src/virt-viewer-window.c b/src/virt-viewer-window.c
index 814726f..22aec0e 100644
--- a/src/virt-viewer-window.c
+++ b/src/virt-viewer-window.c
@@ -718,7 +718,12 @@ static void
 virt_viewer_window_toolbar_leave_fullscreen(GtkWidget *button G_GNUC_UNUSED,
                                             VirtViewerWindow *self)
 {
-    g_object_set(self->priv->app, "fullscreen", FALSE, NULL);
+    /* 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);
 }
 
 static void keycombo_menu_location(GtkMenu *menu G_GNUC_UNUSED, gint *x, gint *y,
-- 
1.8.3.rc1.49.g8d97506


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