[virt-tools-list] [virt-viewer PATCH] Bump min spice to 0.35 and address deprecation warnings
Daniel P. Berrangé
berrange at redhat.com
Fri Jul 27 11:39:36 UTC 2018
Signed-off-by: Daniel P. Berrangé <berrange at redhat.com>
---
README.md | 2 +-
configure.ac | 2 +-
src/virt-viewer-display-spice.c | 2 +-
src/virt-viewer-session-spice.c | 19 +++++++++----------
4 files changed, 12 insertions(+), 13 deletions(-)
diff --git a/README.md b/README.md
index ceb01a9..15c07aa 100644
--- a/README.md
+++ b/README.md
@@ -15,7 +15,7 @@ display of the VNC protocol, which is available from
https://wiki.gnome.org/Projects/gtk-vnc
-Virt Viewer uses the SPICE-GTK (>= 0.33) widget to provide a
+Virt Viewer uses the SPICE-GTK (>= 0.35) widget to provide a
display of the SPICE protocol, which is available from:
https://www.spice-space.org/download.html
diff --git a/configure.ac b/configure.ac
index e262e31..1b99066 100644
--- a/configure.ac
+++ b/configure.ac
@@ -24,7 +24,7 @@ LIBXML2_REQUIRED="2.6.0"
LIBVIRT_REQUIRED="0.10.0"
LIBVIRT_GLIB_REQUIRED="0.1.8"
GTK_VNC_REQUIRED="0.4.0"
-SPICE_GTK_REQUIRED="0.33"
+SPICE_GTK_REQUIRED="0.35"
SPICE_PROTOCOL_REQUIRED="0.12.7"
GOVIRT_REQUIRED="0.3.2"
diff --git a/src/virt-viewer-display-spice.c b/src/virt-viewer-display-spice.c
index a604230..f9b383b 100644
--- a/src/virt-viewer-display-spice.c
+++ b/src/virt-viewer-display-spice.c
@@ -103,7 +103,7 @@ static void update_enabled(VirtViewerDisplay *self, gboolean enabled, gboolean s
return;
g_object_get(self, "nth-display", &nth, NULL);
- spice_main_update_display_enabled(main_channel, nth, enabled, send);
+ spice_main_channel_update_display_enabled(main_channel, nth, enabled, send);
}
static void
diff --git a/src/virt-viewer-session-spice.c b/src/virt-viewer-session-spice.c
index f43ed65..fdc7004 100644
--- a/src/virt-viewer-session-spice.c
+++ b/src/virt-viewer-session-spice.c
@@ -38,7 +38,6 @@
G_DEFINE_TYPE (VirtViewerSessionSpice, virt_viewer_session_spice, VIRT_VIEWER_TYPE_SESSION)
-
struct _VirtViewerSessionSpicePrivate {
GtkWindow *main_window;
SpiceSession *session;
@@ -921,9 +920,9 @@ virt_viewer_session_spice_display_monitors(SpiceChannel *channel,
!display_is_in_fullscreen_mode(self, VIRT_VIEWER_DISPLAY(display))) {
g_debug("display %d should not be enabled, disabling",
virt_viewer_display_get_nth(VIRT_VIEWER_DISPLAY(display)) + 1);
- spice_main_set_display_enabled(virt_viewer_session_spice_get_main_channel(self),
- virt_viewer_display_get_nth(VIRT_VIEWER_DISPLAY(display)),
- FALSE);
+ spice_main_channel_update_display_enabled(virt_viewer_session_spice_get_main_channel(self),
+ virt_viewer_display_get_nth(VIRT_VIEWER_DISPLAY(display)),
+ FALSE, TRUE);
disabled = TRUE;
}
@@ -1055,7 +1054,7 @@ virt_viewer_session_spice_fullscreen_auto_conf(VirtViewerSessionSpice *self)
return FALSE;
}
- spice_main_set_display_enabled(cmain, -1, FALSE);
+ spice_main_channel_update_display_enabled(cmain, -1, FALSE, TRUE);
initial_displays = virt_viewer_app_get_initial_displays(app);
ndisplays = g_list_length(initial_displays);
@@ -1079,15 +1078,15 @@ virt_viewer_session_spice_fullscreen_auto_conf(VirtViewerSessionSpice *self)
GdkRectangle *rect = value;
gint j = GPOINTER_TO_INT(key);
- spice_main_set_display(cmain, j, rect->x, rect->y, rect->width, rect->height);
- spice_main_set_display_enabled(cmain, j, TRUE);
+ spice_main_channel_update_display(cmain, j, rect->x, rect->y, rect->width, rect->height, TRUE);
+ spice_main_channel_update_display_enabled(cmain, j, TRUE, TRUE);
g_debug("Set SPICE display %d to (%d,%d)-(%dx%d)",
j, rect->x, rect->y, rect->width, rect->height);
}
g_list_free(initial_displays);
g_hash_table_unref(displays);
- spice_main_send_monitor_config(cmain);
+ spice_main_channel_send_monitor_config(cmain);
self->priv->did_auto_conf = TRUE;
return TRUE;
}
@@ -1180,8 +1179,8 @@ virt_viewer_session_spice_apply_monitor_geometry(VirtViewerSession *session, GHa
gint i = GPOINTER_TO_INT(key);
GdkRectangle* rect = value;
- spice_main_set_display(self->priv->main_channel, i, rect->x,
- rect->y, rect->width, rect->height);
+ spice_main_channel_update_display(self->priv->main_channel, i, rect->x,
+ rect->y, rect->width, rect->height, TRUE);
}
}
--
2.17.1
More information about the virt-tools-list
mailing list