Commit b0651e42 authored by Marc-André Lureau's avatar Marc-André Lureau
Browse files

Revert "spice-widget: add an API to get guest display size"

This reverts commit 18dfbb9e

.

The motivation behind the new API isn't clear enough.

The guest display size can be retrieved through the "width" and "height"
properties of the associated display channel.
Signed-off-by: default avatarMarc-André Lureau <marcandre.lureau@redhat.com>
parent 1068e4d0
......@@ -33,7 +33,6 @@ spice_display_channel_gl_draw_done;
spice_display_get_gl_scanout;
spice_display_get_grab_keys;
spice_display_get_pixbuf;
spice_display_get_preferred_size;
spice_display_get_primary;
spice_display_get_type;
spice_display_gl_draw_done;
......
......@@ -29,7 +29,6 @@ spice_display_channel_get_primary
spice_display_channel_get_type
spice_display_channel_gl_draw_done
spice_display_get_gl_scanout
spice_display_get_preferred_size
spice_display_get_primary
spice_display_gl_draw_done
spice_file_transfer_task_cancel
......
......@@ -3588,22 +3588,3 @@ GdkPixbuf *spice_display_get_pixbuf(SpiceDisplay *display)
return pixbuf;
}
/**
* spice_display_get_preferred_size:
* @display: a #SpiceDisplay
* @width: the preferred width of the display, in physical pixel
* @height: the preferred height of the display, in physical pixel
*
* Get the preferred width and height of the display.
**/
void spice_display_get_preferred_size(SpiceDisplay *display, int *width, int *height)
{
SpiceDisplayPrivate *d = display->priv;
if (width)
*width = d->area.width;
if (height)
*height = d->area.height;
}
......@@ -79,7 +79,6 @@ SpiceGrabSequence *spice_display_get_grab_keys(SpiceDisplay *display);
void spice_display_send_keys(SpiceDisplay *display, const guint *keyvals,
int nkeyvals, SpiceDisplayKeyEvent kind);
GdkPixbuf *spice_display_get_pixbuf(SpiceDisplay *display);
void spice_display_get_preferred_size(SpiceDisplay *display, int *width, int *height);
G_END_DECLS
......
......@@ -587,7 +587,8 @@ static void menu_cb_resize_to(GtkAction *action G_GNUC_UNUSED,
spin_x = gtk_spin_button_new_with_range(0, G_MAXINT, 10);
spin_y = gtk_spin_button_new_with_range(0, G_MAXINT, 10);
spice_display_get_preferred_size(SPICE_DISPLAY(win->spice), &width, &height);
gtk_widget_get_preferred_width(win->spice, NULL, &width);
gtk_widget_get_preferred_height(win->spice, NULL, &height);
gtk_spin_button_set_value(GTK_SPIN_BUTTON(spin_width), width);
gtk_spin_button_set_value(GTK_SPIN_BUTTON(spin_height), height);
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment