Blame SOURCES/0011-kiosk-open-a-window-on-each-client-monitor.patch

4a6991
From dc45278502108076a95f8878a4ef2d6720034d9e Mon Sep 17 00:00:00 2001
4a6991
From: =?UTF-8?q?Marc-Andr=C3=A9=20Lureau?= <marcandre.lureau@gmail.com>
4a6991
Date: Mon, 15 Jul 2013 20:54:10 +0200
4a6991
Subject: [PATCH] kiosk: open a window on each client monitor
4a6991
4a6991
Open a window on each client monitor in fullscreen. If the remote
4a6991
display has less monitors than the client, the extra client monitors
4a6991
will still be used to prevent the user from accessing the windows or
4a6991
desktop below, and also to show some status messages when necessary.
4a6991
4a6991
(cherry picked from commit 90f5bf7ac79421438481ad371cc8c1394ff89970)
4a6991
https://bugzilla.redhat.com/show_bug.cgi?id=1040926
4a6991
---
4a6991
 src/virt-viewer-app.c | 15 +++++++++++++++
4a6991
 1 file changed, 15 insertions(+)
4a6991
4a6991
diff --git a/src/virt-viewer-app.c b/src/virt-viewer-app.c
4a6991
index d3755d8..2d68625 100644
4a6991
--- a/src/virt-viewer-app.c
4a6991
+++ b/src/virt-viewer-app.c
4a6991
@@ -1266,7 +1266,22 @@ static void virt_viewer_app_usb_failed(VirtViewerSession *session G_GNUC_UNUSED,
4a6991
 static void
4a6991
 virt_viewer_app_set_kiosk(VirtViewerApp *self, gboolean enabled)
4a6991
 {
4a6991
+    int i;
4a6991
+
4a6991
     self->priv->kiosk = enabled;
4a6991
+    virt_viewer_app_set_fullscreen(self, enabled);
4a6991
+
4a6991
+    for (i = 0; i < gdk_screen_get_n_monitors(gdk_screen_get_default()); i++) {
4a6991
+        VirtViewerWindow *win = virt_viewer_app_get_nth_window(self, i);
4a6991
+
4a6991
+        if (win == NULL)
4a6991
+            win = virt_viewer_app_window_new(self, i);
4a6991
+
4a6991
+        if (enabled)
4a6991
+            virt_viewer_window_show(win);
4a6991
+
4a6991
+        virt_viewer_window_set_kiosk(win, enabled);
4a6991
+    }
4a6991
 }
4a6991
 
4a6991