[virt-tools-list] [PATCH virt-viewer 03/12] kiosk: open a window on each client monitor

Marc-André Lureau marcandre.lureau at gmail.com
Mon Jul 15 19:36:10 UTC 2013


---
 src/virt-viewer-app.c | 22 +++++++++++++++++++++-
 1 file changed, 21 insertions(+), 1 deletion(-)

diff --git a/src/virt-viewer-app.c b/src/virt-viewer-app.c
index 794dddd..5456b8d 100644
--- a/src/virt-viewer-app.c
+++ b/src/virt-viewer-app.c
@@ -1235,6 +1235,26 @@ static void virt_viewer_app_usb_failed(VirtViewerSession *session G_GNUC_UNUSED,
 }
 
 static void
+virt_viewer_app_set_kiosk(VirtViewerApp *self, gboolean enabled)
+{
+    int i;
+
+    self->priv->kiosk = enabled;
+    virt_viewer_app_set_fullscreen(self, enabled);
+
+    if (enabled) {
+        for (i = 1; i < gdk_screen_get_n_monitors(gdk_screen_get_default()); i++) {
+            if (virt_viewer_app_get_nth_window(self, i))
+                continue;
+
+            VirtViewerWindow *win = virt_viewer_app_window_new(self, i);
+            virt_viewer_window_show(win);
+        }
+    }
+}
+
+
+static void
 virt_viewer_app_get_property (GObject *object, guint property_id,
                               GValue *value G_GNUC_UNUSED, GParamSpec *pspec)
 {
@@ -1329,7 +1349,7 @@ virt_viewer_app_set_property (GObject *object, guint property_id,
         break;
 
     case PROP_KIOSK:
-        priv->kiosk = g_value_get_boolean(value);
+        virt_viewer_app_set_kiosk(self, g_value_get_boolean(value));
         break;
 
     default:
-- 
1.8.3.rc1.49.g8d97506




More information about the virt-tools-list mailing list