[virt-tools-list] [PATCH virt-viewer 09/12] kiosk: prevent app to quit or window to hide
Marc-André Lureau
marcandre.lureau at gmail.com
Mon Jul 15 19:36:16 UTC 2013
---
src/virt-viewer-app.c | 5 +++++
src/virt-viewer-window.c | 5 +++++
2 files changed, 10 insertions(+)
diff --git a/src/virt-viewer-app.c b/src/virt-viewer-app.c
index ffcf451..86ebdad 100644
--- a/src/virt-viewer-app.c
+++ b/src/virt-viewer-app.c
@@ -247,6 +247,11 @@ virt_viewer_app_quit(VirtViewerApp *self)
g_return_if_fail(VIRT_VIEWER_IS_APP(self));
VirtViewerAppPrivate *priv = self->priv;
+ if (self->priv->kiosk) {
+ g_warning("The app is in kiosk mode and can't quit");
+ return;
+ }
+
virt_viewer_app_save_config(self);
if (priv->session) {
diff --git a/src/virt-viewer-window.c b/src/virt-viewer-window.c
index f483027..5590443 100644
--- a/src/virt-viewer-window.c
+++ b/src/virt-viewer-window.c
@@ -1194,6 +1194,11 @@ virt_viewer_window_show(VirtViewerWindow *self)
void
virt_viewer_window_hide(VirtViewerWindow *self)
{
+ if (self->priv->kiosk) {
+ g_warning("Can't hide windows in kiosk mode");
+ return;
+ }
+
gtk_widget_hide(self->priv->window);
if (self->priv->display) {
--
1.8.3.rc1.49.g8d97506
More information about the virt-tools-list
mailing list