Now that we pass the real monitor coordinates, tell spice-gtk to use them, rather then to use the passed coordinates as input for its automatic monitor alignment. This fixes ie monitors in a 2x2 grid, showing up as a 4x1 configuration in the guest. Signed-off-by: Hans de Goede <hdegoede@xxxxxxxxxx> --- src/virt-viewer-display-spice.c | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) diff --git a/src/virt-viewer-display-spice.c b/src/virt-viewer-display-spice.c index 063188a..d15f415 100644 --- a/src/virt-viewer-display-spice.c +++ b/src/virt-viewer-display-spice.c @@ -190,6 +190,7 @@ virt_viewer_display_spice_size_allocate(VirtViewerDisplaySpice *self, guint zoom = 100; guint nth; gint x = 0, y = 0; + gboolean disable_display_position = TRUE; if (virt_viewer_display_get_auto_resize(VIRT_VIEWER_DISPLAY(self)) == FALSE) return; @@ -203,6 +204,7 @@ virt_viewer_display_spice_size_allocate(VirtViewerDisplaySpice *self, int n = gdk_screen_get_monitor_at_window(screen, gtk_widget_get_window(GTK_WIDGET(self))); gdk_screen_get_monitor_geometry(screen, n, &monitor); + disable_display_position = FALSE; x = monitor.x; y = monitor.y; dw = monitor.width; @@ -218,9 +220,14 @@ virt_viewer_display_spice_size_allocate(VirtViewerDisplaySpice *self, g_object_get(self, "nth-display", &nth, NULL); - if (self->priv->auto_resize != AUTO_RESIZE_NEVER) + if (self->priv->auto_resize != AUTO_RESIZE_NEVER) { + g_object_set(get_main(VIRT_VIEWER_DISPLAY(self)), + "disable-display-position", disable_display_position, + "disable-display-align", !disable_display_position, + NULL); spice_main_set_display(get_main(VIRT_VIEWER_DISPLAY(self)), nth, x, y, dw, dh); + } if (self->priv->auto_resize == AUTO_RESIZE_FULLSCREEN) self->priv->auto_resize = AUTO_RESIZE_NEVER; } -- 1.8.1 _______________________________________________ virt-tools-list mailing list virt-tools-list@xxxxxxxxxx https://www.redhat.com/mailman/listinfo/virt-tools-list