[virt-tools-list] [PATCHv2 virt-viewer 08/10] kiosk: warn and prevent if app want to quit or window to hide

Marc-André Lureau marcandre.lureau at gmail.com
Fri Aug 16 19:47:44 UTC 2013


These condition shouldn't happen, they are here for debugging
purposes (ie file a bug if it happens).
---
 src/virt-viewer-window.c | 5 +++++
 1 file changed, 5 insertions(+)

diff --git a/src/virt-viewer-window.c b/src/virt-viewer-window.c
index abd417b..ac6b8fe 100644
--- a/src/virt-viewer-window.c
+++ b/src/virt-viewer-window.c
@@ -1299,6 +1299,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