[virt-tools-list] [PATCHv3 virt-viewer 05/12] kiosk: open a window on each client monitor
Marc-André Lureau
marcandre.lureau at gmail.com
Tue Aug 20 12:19:55 UTC 2013
Open a window on each client monitor in fullscreen. If the remote
display has less monitors than the client, the extra client monitors
will still be used to prevent the user from accessing the windows or
desktop below, and also to show some status messages when necessary.
---
src/virt-viewer-app.c | 15 +++++++++++++++
1 file changed, 15 insertions(+)
diff --git a/src/virt-viewer-app.c b/src/virt-viewer-app.c
index 875b172..4bc2445 100644
--- a/src/virt-viewer-app.c
+++ b/src/virt-viewer-app.c
@@ -1266,7 +1266,22 @@ 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);
+
+ for (i = 0; i < gdk_screen_get_n_monitors(gdk_screen_get_default()); i++) {
+ VirtViewerWindow *win = virt_viewer_app_get_nth_window(self, i);
+
+ if (win == NULL)
+ win = virt_viewer_app_window_new(self, i);
+
+ if (enabled)
+ virt_viewer_window_show(win);
+
+ virt_viewer_window_set_kiosk(win, enabled);
+ }
}
--
1.8.3.rc1.49.g8d97506
More information about the virt-tools-list
mailing list