[virt-tools-list] [PATCHv2 virt-viewer 06/10] kiosk: teach a window to become kiosk-mode

Christophe Fergeau cfergeau at redhat.com
Mon Aug 19 18:32:05 UTC 2013


ACK

On Fri, Aug 16, 2013 at 09:47:42PM +0200, Marc-André Lureau wrote:
> Remove the toolbar, disable modifiers.
> ---
>  src/virt-viewer-window.c | 20 ++++++++++++++++++++
>  1 file changed, 20 insertions(+)
> 
> diff --git a/src/virt-viewer-window.c b/src/virt-viewer-window.c
> index 74c020a..abd417b 100644
> --- a/src/virt-viewer-window.c
> +++ b/src/virt-viewer-window.c
> @@ -1260,6 +1260,23 @@ virt_viewer_window_set_display(VirtViewerWindow *self, VirtViewerDisplay *displa
>      }
>  }
>  
> +static void
> +virt_viewer_window_enable_kiosk(VirtViewerWindow *self)
> +{
> +    VirtViewerWindowPrivate *priv;
> +
> +    g_return_if_fail(VIRT_VIEWER_IS_WINDOW(self));
> +    priv = self->priv;
> +
> +    ViewOvBox_SetOver(VIEW_OV_BOX(priv->layout), gtk_drawing_area_new());
> +    ViewAutoDrawer_SetActive(VIEW_AUTODRAWER(priv->layout), FALSE);
> +    ViewAutoDrawer_SetOverlapPixels(VIEW_AUTODRAWER(priv->layout), 0);
> +
> +    /* You probably also want X11 Option "DontVTSwitch" "true" */
> +    /* and perhaps more distro/desktop-specific options */
> +    virt_viewer_window_disable_modifiers(self);
> +}
> +
>  void
>  virt_viewer_window_show(VirtViewerWindow *self)
>  {
> @@ -1273,6 +1290,9 @@ virt_viewer_window_show(VirtViewerWindow *self)
>          self->priv->desktop_resize_pending = FALSE;
>      }
>  
> +    if (self->priv->kiosk)
> +        virt_viewer_window_enable_kiosk(self);
> +
>      virt_viewer_window_move_to_monitor(self);
>  }
>  
> -- 
> 1.8.3.rc1.49.g8d97506
> 
> _______________________________________________
> virt-tools-list mailing list
> virt-tools-list at redhat.com
> https://www.redhat.com/mailman/listinfo/virt-tools-list
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 198 bytes
Desc: not available
URL: <http://listman.redhat.com/archives/virt-tools-list/attachments/20130819/70ccb67e/attachment.sig>


More information about the virt-tools-list mailing list