display: Set value of desktop width and height property directly

Avoid calling gtk_widget_queue_resize() and emiting
the "display-desktop-resize" signal.
The only user of the properties is virt_viewer_display_spice_set_desktop()
which will call the function and emit the signal after setting both
"desktop-width" and "desktop-height" properties.

Acked-by: Eduardo Lima (Etrunko) <etrunko@redhat.com>
This commit is contained in:
Pavel Grunt 2016-01-27 18:26:56 +01:00
parent 045174f483
commit 422cbb6ea6

View File

@ -301,14 +301,10 @@ virt_viewer_display_set_property(GObject *object,
switch (prop_id) {
case PROP_DESKTOP_WIDTH:
virt_viewer_display_set_desktop_size(display,
g_value_get_int(value),
priv->desktopHeight);
priv->desktopWidth = g_value_get_int(value);
break;
case PROP_DESKTOP_HEIGHT:
virt_viewer_display_set_desktop_size(display,
priv->desktopWidth,
g_value_get_int(value));
priv->desktopHeight = g_value_get_int(value);
break;
case PROP_NTH_DISPLAY:
priv->nth_display = g_value_get_int(value);