ACK series, though I'm not a big fan of calling spice_channel_get_error() from arbitrary places (it's basically only usable from virt_viewer_session_spice_main_channel_event()). Christophe On Wed, Apr 15, 2015 at 12:03:20PM +0200, Fabiano Fidêncio wrote: > --- > src/virt-viewer-display.c | 44 +++++++++++++++++++++----------------------- > 1 file changed, 21 insertions(+), 23 deletions(-) > > diff --git a/src/virt-viewer-display.c b/src/virt-viewer-display.c > index ddbb045..3efe24c 100644 > --- a/src/virt-viewer-display.c > +++ b/src/virt-viewer-display.c > @@ -798,31 +798,29 @@ void virt_viewer_display_get_preferred_monitor_geometry(VirtViewerDisplay* self, > topx = MAX(topx, 0); > topy = MAX(topy, 0); > > - { > - if (virt_viewer_display_get_fullscreen(VIRT_VIEWER_DISPLAY(self))) { > - GdkRectangle physical_monitor; > - GdkScreen *screen = gtk_widget_get_screen(GTK_WIDGET(self)); > - int n = virt_viewer_display_get_monitor(VIRT_VIEWER_DISPLAY(self)); > - if (n == -1) > - n = gdk_screen_get_monitor_at_window(screen, > - gtk_widget_get_window(GTK_WIDGET(self))); > - gdk_screen_get_monitor_geometry(screen, n, &physical_monitor); > - preferred->x = physical_monitor.x; > - preferred->y = physical_monitor.y; > - preferred->width = physical_monitor.width; > - preferred->height = physical_monitor.height; > - } else { > - gtk_widget_get_allocation(GTK_WIDGET(self), preferred); > - preferred->x = topx; > - preferred->y = topy; > - } > + if (virt_viewer_display_get_fullscreen(VIRT_VIEWER_DISPLAY(self))) { > + GdkRectangle physical_monitor; > + GdkScreen *screen = gtk_widget_get_screen(GTK_WIDGET(self)); > + int n = virt_viewer_display_get_monitor(VIRT_VIEWER_DISPLAY(self)); > + if (n == -1) > + n = gdk_screen_get_monitor_at_window(screen, > + gtk_widget_get_window(GTK_WIDGET(self))); > + gdk_screen_get_monitor_geometry(screen, n, &physical_monitor); > + preferred->x = physical_monitor.x; > + preferred->y = physical_monitor.y; > + preferred->width = physical_monitor.width; > + preferred->height = physical_monitor.height; > + } else { > + gtk_widget_get_allocation(GTK_WIDGET(self), preferred); > + preferred->x = topx; > + preferred->y = topy; > + } > > - if (virt_viewer_display_get_zoom(VIRT_VIEWER_DISPLAY(self))) { > - guint zoom = virt_viewer_display_get_zoom_level(VIRT_VIEWER_DISPLAY(self)); > + if (virt_viewer_display_get_zoom(VIRT_VIEWER_DISPLAY(self))) { > + guint zoom = virt_viewer_display_get_zoom_level(VIRT_VIEWER_DISPLAY(self)); > > - preferred->width = round(preferred->width * NORMAL_ZOOM_LEVEL / zoom); > - preferred->height = round(preferred->height * NORMAL_ZOOM_LEVEL / zoom); > - } > + preferred->width = round(preferred->width * NORMAL_ZOOM_LEVEL / zoom); > + preferred->height = round(preferred->height * NORMAL_ZOOM_LEVEL / zoom); > } > } > > -- > 2.3.5 > > _______________________________________________ > virt-tools-list mailing list > virt-tools-list@xxxxxxxxxx > https://www.redhat.com/mailman/listinfo/virt-tools-list
Attachment:
pgpxJ8N7ww4sE.pgp
Description: PGP signature
_______________________________________________ virt-tools-list mailing list virt-tools-list@xxxxxxxxxx https://www.redhat.com/mailman/listinfo/virt-tools-list