[Spice-commits] src/spice-widget.c
Pavel Grunt
pgrunt at kemper.freedesktop.org
Fri Apr 22 15:03:38 UTC 2016
src/spice-widget.c | 4 +++-
1 file changed, 3 insertions(+), 1 deletion(-)
New commits:
commit fb9d118d8cde72b05e49a51b8ded13bcf9a8302b
Author: Javier Celaya <javier.celaya at flexvdi.com>
Date: Fri Apr 22 10:08:02 2016 +0200
Spice-widget: Allow smaller widget with scaling enabled
When resize-guest-to-match-window-size is disabled, the size request
(minimum size) of the spice widget is set to the current guest
resolution. The client window cannot be made smaller, even with
scale-display enabled.
This patch sets a size request of 640x480 when either
resize-guest-to-match-window-size OR scale-display are enabled, making
it posible to shrink the window and scale down the display.
Acked-by: Pavel Grunt <pgrunt at redhat.com>
diff --git a/src/spice-widget.c b/src/spice-widget.c
index 617cd26..b458909 100644
--- a/src/spice-widget.c
+++ b/src/spice-widget.c
@@ -117,6 +117,7 @@ static void update_area(SpiceDisplay *display, gint x, gint y, gint width, gint
static void release_keys(SpiceDisplay *display);
static void size_allocate(GtkWidget *widget, GtkAllocation *conf, gpointer data);
static gboolean draw_event(GtkWidget *widget, cairo_t *cr, gpointer data);
+static void update_size_request(SpiceDisplay *display);
/* ---------------------------------------------------------------- */
@@ -180,6 +181,7 @@ static void scaling_updated(SpiceDisplay *display)
if (d->ximage && window) { /* if not yet shown */
gtk_widget_queue_draw(GTK_WIDGET(display));
}
+ update_size_request(display);
}
static void update_size_request(SpiceDisplay *display)
@@ -187,7 +189,7 @@ static void update_size_request(SpiceDisplay *display)
SpiceDisplayPrivate *d = display->priv;
gint reqwidth, reqheight;
- if (d->resize_guest_enable) {
+ if (d->resize_guest_enable || d->allow_scaling) {
reqwidth = 640;
reqheight = 480;
} else {
More information about the Spice-commits
mailing list