[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]

Re: [virt-tools-list] [PATCH virt-viewer 07/12] kiosk: teach a window to become kiosk-mode



On Thu, Aug 15, 2013 at 4:43 PM, Daniel P. Berrange <berrange redhat com> wrote:
> On Mon, Jul 15, 2013 at 09:36:14PM +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 69e50b8..f483027 100644
>> --- a/src/virt-viewer-window.c
>> +++ b/src/virt-viewer-window.c
>> @@ -1155,6 +1155,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);
>
> IIUC, here you are replacing the widget previously setup as the "over"
> window. Can we just not add the toolbar in the first place, rather
> than removing it afterwards.

I had in mind that you can enable kiosk mode dynamically (ie start
normally, and turn it on later). So, I'd keep that way.

>
>> +
>> +    // You probably also want X11 Option "DontVTSwitch" "true"
>> +    // and perhaps more distro/desktop-specific options
>
> C style comments please
>

ok

>> +    virt_viewer_window_disable_modifiers(self);
>> +}
>> +
>>  void
>>  virt_viewer_window_show(VirtViewerWindow *self)
>>  {
>> @@ -1168,6 +1185,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 redhat com
>> https://www.redhat.com/mailman/listinfo/virt-tools-list
>
> --
> |: http://berrange.com      -o-    http://www.flickr.com/photos/dberrange/ :|
> |: http://libvirt.org              -o-             http://virt-manager.org :|
> |: http://autobuild.org       -o-         http://search.cpan.org/~danberr/ :|
> |: http://entangle-photo.org       -o-       http://live.gnome.org/gtk-vnc :|



-- 
Marc-André Lureau


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]