[spice-gtk v2] Spice-widget: Allow smaller widget with scaling enabled

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



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.
---
 src/spice-widget.c | 5 ++++-
 1 file changed, 4 insertions(+), 1 deletion(-)

diff --git a/src/spice-widget.c b/src/spice-widget.c
index 6f638fb..a7f31c4 100644
--- a/src/spice-widget.c
+++ b/src/spice-widget.c
@@ -169,6 +169,8 @@ static void spice_display_get_property(GObject    *object,
     }
 }
 
+static void update_size_request(SpiceDisplay *display);
+
 static void scaling_updated(SpiceDisplay *display)
 {
     SpiceDisplayPrivate *d = display->priv;
@@ -178,6 +180,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)
@@ -185,7 +188,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 {
-- 
2.4.3

_______________________________________________
Spice-devel mailing list
Spice-devel@xxxxxxxxxxxxxxxxxxxxx
https://lists.freedesktop.org/mailman/listinfo/spice-devel




[Index of Archives]     [Linux ARM Kernel]     [Linux ARM]     [Linux Omap]     [Fedora ARM]     [IETF Annouce]     [Security]     [Bugtraq]     [Linux]     [Linux OMAP]     [Linux MIPS]     [ECOS]     [Asterisk Internet PBX]     [Linux API]     [Monitors]