[virt-tools-list] [PATCH virt-viewer 3/3] spice: enable/disable scaling when property changes
Marc-André Lureau
marcandre.lureau at gmail.com
Thu Feb 27 15:26:23 UTC 2014
---
src/virt-viewer-display-spice.c | 12 ++++++++++++
1 file changed, 12 insertions(+)
diff --git a/src/virt-viewer-display-spice.c b/src/virt-viewer-display-spice.c
index d13fbda..de519b7 100644
--- a/src/virt-viewer-display-spice.c
+++ b/src/virt-viewer-display-spice.c
@@ -212,6 +212,16 @@ zoom_level_changed(VirtViewerDisplaySpice *self,
}
static void
+scale_changed(VirtViewerDisplaySpice *self,
+ GParamSpec *pspec G_GNUC_UNUSED,
+ VirtViewerApp *app G_GNUC_UNUSED)
+{
+ g_object_set(self->priv->display, "scaling",
+ virt_viewer_display_get_scale(VIRT_VIEWER_DISPLAY(self)),
+ NULL);
+}
+
+static void
enable_accel_changed(VirtViewerApp *app,
GParamSpec *pspec G_GNUC_UNUSED,
VirtViewerDisplaySpice *self)
@@ -301,6 +311,8 @@ virt_viewer_display_spice_new(VirtViewerSessionSpice *session,
G_CALLBACK(fullscreen_changed), app, 0);
virt_viewer_signal_connect_object(self, "notify::zoom-level",
G_CALLBACK(zoom_level_changed), app, 0);
+ virt_viewer_signal_connect_object(self, "notify::scale",
+ G_CALLBACK(scale_changed), app, 0);
fullscreen_changed(self, NULL, app);
enable_accel_changed(app, NULL, self);
--
1.8.5.3
More information about the virt-tools-list
mailing list