[Spice-commits] src/spice-widget.c
Jonathon Jongsma
jjongsma at kemper.freedesktop.org
Thu Jul 14 16:29:18 UTC 2016
src/spice-widget.c | 4 +---
1 file changed, 1 insertion(+), 3 deletions(-)
New commits:
commit ea1f4c9ce68c6bc61b2148b4e578422a54a179da
Author: Jonathon Jongsma <jjongsma at redhat.com>
Date: Thu Jul 14 09:49:14 2016 -0500
SpiceWidget: limit scope of 'area' variable
'area' was being set within the 'else' branch, but was not actually
used. So just move the declaration of 'area' within the if statement
where it is actually used. This potentially avoids "set-but-not-used"
warnings when GDK_WINDOWING_X11 is not defined.
diff --git a/src/spice-widget.c b/src/spice-widget.c
index c5353af..c7dd553 100644
--- a/src/spice-widget.c
+++ b/src/spice-widget.c
@@ -1195,7 +1195,6 @@ static gboolean do_color_convert(SpiceDisplay *display, GdkRectangle *r)
static void set_egl_enabled(SpiceDisplay *display, bool enabled)
{
SpiceDisplayPrivate *d = display->priv;
- GtkWidget *area;
if (egl_enabled(d) == enabled)
return;
@@ -1205,12 +1204,11 @@ static void set_egl_enabled(SpiceDisplay *display, bool enabled)
/* even though the function is marked as deprecated, it's the
* only way I found to prevent glitches when the window is
* resized. */
- area = gtk_stack_get_child_by_name(d->stack, "draw-area");
+ GtkWidget *area = gtk_stack_get_child_by_name(d->stack, "draw-area");
gtk_widget_set_double_buffered(GTK_WIDGET(area), !enabled);
} else
#endif
{
- area = gtk_stack_get_child_by_name(d->stack, "gl-area");
gtk_stack_set_visible_child_name(d->stack,
enabled ? "gl-area" : "draw-area");
}
More information about the Spice-commits
mailing list