<html>
<head>
<meta content="text/html; charset=utf-8" http-equiv="Content-Type">
</head>
<body text="#000000" bgcolor="#FFFFFF">
Hi<br>
<br>
<div class="moz-cite-prefix">El 22/04/16 a las 09:19, Pavel Grunt
escribió:<br>
</div>
<blockquote cite="mid:1461309552.2178.5.camel@redhat.com"
type="cite">
<pre wrap="">Hi Javier,
sorry, I must have missed the patch. Can you please explain the problem? How to
reproduce it? Is it about spicy?</pre>
</blockquote>
Sorry, the commit message may be a bit short. I'll send a second
version with a longer explanation, along with the the declaration of
update_size_request().<br>
I found the problem with spicy, but I suppose it affects other
clients too. You can reproduce it checking the "scale display"
option and unchecking the "resize guest to match window size"
option. Then, the spice widget takes a minimum size of the current
guest resolution. The window can be made bigger, but never smaller.<br>
<blockquote cite="mid:1461309552.2178.5.camel@redhat.com"
type="cite">
<pre wrap="">
About the patch - you should declare the update_size_request() function instead
of moving scaling_updated() down - it would be more clear what has changed.
Thanks,
Pavel
On Fri, 2016-04-22 at 08:06 +0200, Javier Celaya wrote:
</pre>
<blockquote type="cite">
<pre wrap="">Can someone review this patch, please?
Thank you
El 13/04/16 a las 13:42, Javier Celaya escribió:
</pre>
<blockquote type="cite">
<pre wrap="">With scaling enabled, the size request of the widget must be 640x480
(the same as with resize_guest_enable) so that the widget can be
actually scalled down.
---
src/spice-widget.c | 25 +++++++++++++------------
1 file changed, 13 insertions(+), 12 deletions(-)
diff --git a/src/spice-widget.c b/src/spice-widget.c
index 6f638fb..f445f3f 100644
--- a/src/spice-widget.c
+++ b/src/spice-widget.c
@@ -169,23 +169,12 @@ static void
spice_display_get_property(GObject *object,
}
}
-static void scaling_updated(SpiceDisplay *display)
-{
- SpiceDisplayPrivate *d = display->priv;
- GdkWindow *window = gtk_widget_get_window(GTK_WIDGET(display));
-
- recalc_geometry(GTK_WIDGET(display));
- if (d->ximage && window) { /* if not yet shown */
- gtk_widget_queue_draw(GTK_WIDGET(display));
- }
-}
-
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 {
@@ -197,6 +186,18 @@ static void update_size_request(SpiceDisplay *display)
recalc_geometry(GTK_WIDGET(display));
}
+static void scaling_updated(SpiceDisplay *display)
+{
+ SpiceDisplayPrivate *d = display->priv;
+ GdkWindow *window = gtk_widget_get_window(GTK_WIDGET(display));
+
+ recalc_geometry(GTK_WIDGET(display));
+ if (d->ximage && window) { /* if not yet shown */
+ gtk_widget_queue_draw(GTK_WIDGET(display));
+ }
+ update_size_request(display);
+}
+
static void update_keyboard_focus(SpiceDisplay *display, gboolean state)
{
SpiceDisplayPrivate *d = display->priv;
</pre>
</blockquote>
<pre wrap="">
--
Javier Celaya Software Engineer <a class="moz-txt-link-abbreviated" href="mailto:javier.celaya@flexvdi.com">javier.celaya@flexvdi.com</a>
+34 876 60 00 73 @j_celaya
_______________________________________________
Spice-devel mailing list
<a class="moz-txt-link-abbreviated" href="mailto:Spice-devel@lists.freedesktop.org">Spice-devel@lists.freedesktop.org</a>
<a class="moz-txt-link-freetext" href="https://lists.freedesktop.org/mailman/listinfo/spice-devel">https://lists.freedesktop.org/mailman/listinfo/spice-devel</a>
</pre>
</blockquote>
</blockquote>
<br>
<div class="moz-signature">-- <br>
<p style=" margin-top:0px; margin-bottom:0px; margin-left:0px;
margin-right:0px; -qt-block-indent:0; text-indent:0px;
-qt-user-state:0;"><br>
<br>
</p>
<table style=" margin-top:0px; margin-bottom:0px; margin-left:0px;
margin-right:0px;" width="480" border="0" cellpadding="0"
cellspacing="0">
<tbody>
<tr>
<td style=" vertical-align:top; padding-right:10;">
<p style=" margin-top:0px; margin-bottom:0px;
margin-left:0px; margin-right:0px; -qt-block-indent:0;
text-indent:0px; -qt-user-state:0;"><a
href="http://flexvdi.com"><img
src="cid:part1.00030505.07080206@flexvdi.com"
style="vertical-align: top;" height="45" width="151"></a><a
href="http://flexvdi.com"><span style="
font-family:'Lato,Arial'; text-decoration:
underline; color:#0057ae;"> </span></a></p>
<p style=" margin-top:0px; margin-bottom:0px;
margin-left:0px; margin-right:0px; -qt-block-indent:0;
text-indent:0px; -qt-user-state:0;"><span style="
font-family:'Lato,Arial'; font-size:15px;
font-weight:600; color:#3e5d6b;">Javier Celaya </span></p>
<p style=" margin-top:0px; margin-bottom:0px;
margin-left:0px; margin-right:0px; -qt-block-indent:0;
text-indent:0px; -qt-user-state:0;"><span style="
font-family:'Lato,Arial'; font-size:13px;
font-style:italic; color:#00a1c1;">Software Engineer </span></p>
</td>
<td style=" padding-left:18; padding-right:18;
padding-top:7; padding-bottom:7;">
<p style=" margin-top:0px; margin-bottom:0px;
margin-left:0px; margin-right:0px; -qt-block-indent:0;
text-indent:0px; -qt-user-state:0;"><img
src="cid:part4.06040506.08020508@flexvdi.com"
style="float: left;" height="17" width="17"><span
style=" font-family:'Lato,Arial';"> </span><a
name="info"></a><a
href="mailto:javier.celaya@flexvdi.com"><span style="
font-family:'Lato,Arial'; font-size:14px;
text-decoration: underline; color:#727272;">j</span></a><span
style=" font-family:'Lato,Arial'; font-size:14px;
text-decoration: underline; color:#727272;"><a class="moz-txt-link-abbreviated" href="mailto:avier.celaya@flexvdi.com">avier.celaya@flexvdi.com</a></span><span
style=" font-family:'Lato,Arial';"> </span></p>
<p style=" margin-top:0px; margin-bottom:0px;
margin-left:0px; margin-right:0px; -qt-block-indent:0;
text-indent:0px; -qt-user-state:0;"><img
src="cid:part7.09090508.09030703@flexvdi.com"
style="float: left;" height="17" width="17"><span
style=" font-family:'Lato,Arial';"> </span><a
name="info"></a><span style="
font-family:'Lato,Arial'; font-size:14px;
color:#727272;">+</span><span style="
font-family:'Lato,Arial'; font-size:14px;
color:#727272;">34 876 60 00 73</span></p>
<p style=" margin-top:0px; margin-bottom:0px;
margin-left:0px; margin-right:0px; -qt-block-indent:0;
text-indent:0px; -qt-user-state:0;"><img
src="cid:part9.01040309.00060904@flexvdi.com"
style="float: left;" height="17" width="17"><span
style=" font-family:'Lato,Arial';"> </span><a
name="info"></a><span style="
font-family:'Lato,Arial'; font-size:14px;
color:#727272;">@</span><span style="
font-family:'Lato,Arial'; font-size:14px;
color:#727272;">j_celaya</span><span style="
font-family:'Lato,Arial';"> </span></p>
</td>
</tr>
</tbody>
</table>
<table style=" margin-top:0px; margin-bottom:0px; margin-left:0px;
margin-right:0px;" border="0" cellpadding="0" cellspacing="2">
</table>
</div>
</body>
</html>