[virt-tools-list] [PATCH virt-viewer 1/3] virt-viewer-window: Set zoom when display is enabled and ready.

Fabiano Fidêncio fabiano at fidencio.org
Thu Apr 9 08:50:26 UTC 2015


On Wed, Apr 8, 2015 at 4:19 PM, Jonathon Jongsma <jjongsma at redhat.com> wrote:
> This series looks good to me.  ACK.
>
> On Sun, 2015-04-05 at 15:45 +0200, Pavel Grunt wrote:
>> The display has default dimensions (100x100) when it is disabled.
>> Calculating the minimal zoom for the display will give wrong value
>> for the newly opened display.
>>
>> It is better to wait for setting the zoom level to the moment when
>> the display is enabled and ready.
>>
>> Related to: https://bugzilla.redhat.com/show_bug.cgi?id=1206460
>> ---
>>  src/virt-viewer-window.c | 5 ++++-
>>  1 file changed, 4 insertions(+), 1 deletion(-)
>>
>> diff --git a/src/virt-viewer-window.c b/src/virt-viewer-window.c
>> index c660778..e4ec265 100644
>> --- a/src/virt-viewer-window.c
>> +++ b/src/virt-viewer-window.c
>> @@ -1281,6 +1281,10 @@ display_show_hint(VirtViewerDisplay *display,
>>
>>      hint = (hint & VIRT_VIEWER_DISPLAY_SHOW_HINT_READY);
>>
>> +    if (hint && virt_viewer_display_get_enabled(display)) {
>> +        virt_viewer_window_set_zoom_level(self, self->priv->zoomlevel);
>> +    }
>> +
>>      gtk_widget_set_sensitive(GTK_WIDGET(gtk_builder_get_object(self->priv->builder, "menu-file-screenshot")), hint);
>>  }
>>  static gboolean
>> @@ -1310,7 +1314,6 @@ virt_viewer_window_set_display(VirtViewerWindow *self, VirtViewerDisplay *displa
>>      if (display != NULL) {
>>          priv->display = g_object_ref(display);
>>
>> -        virt_viewer_window_set_zoom_level(self, priv->zoomlevel);
>>          virt_viewer_display_set_monitor(VIRT_VIEWER_DISPLAY(priv->display), priv->fullscreen_monitor);
>>          virt_viewer_display_set_fullscreen(VIRT_VIEWER_DISPLAY(priv->display), priv->fullscreen);
>>
>
>
> _______________________________________________
> virt-tools-list mailing list
> virt-tools-list at redhat.com
> https://www.redhat.com/mailman/listinfo/virt-tools-list


Pushed, thanks!
-- 
Fabiano Fidêncio




More information about the virt-tools-list mailing list