[Spice-commits] src/spice-widget.c
Pavel Grunt
pgrunt at kemper.freedesktop.org
Tue Mar 29 15:54:27 UTC 2016
src/spice-widget.c | 11 ++++++-----
1 file changed, 6 insertions(+), 5 deletions(-)
New commits:
commit 0f3c872a84ea38aba9b2144005cda9e4f177d23a
Author: Pavel Grunt <pgrunt at redhat.com>
Date: Tue Mar 29 17:08:28 2016 +0200
widget: Avoid combining ternary with another operators
Logical operators like "&&" has higher precedency than "?:".
Readiness of SpiceDisplay was wrongly determined due to missing
parentheses around the ternary operator.
Fixes:
https://bugs.freedesktop.org/show_bug.cgi?id=94738
Acked-by: Victor Toso <victortoso at redhat.com>
diff --git a/src/spice-widget.c b/src/spice-widget.c
index 21b1c14..f605439 100644
--- a/src/spice-widget.c
+++ b/src/spice-widget.c
@@ -230,14 +230,15 @@ static gint get_display_id(SpiceDisplay *display)
static void update_ready(SpiceDisplay *display)
{
SpiceDisplayPrivate *d = display->priv;
- gboolean ready;
+ gboolean ready = FALSE;
- ready = d->monitor_ready &&
+ if (d->monitor_ready) {
#ifndef G_OS_WIN32
- d->egl.enabled ? d->egl.image != NULL :
+ ready = d->egl.enabled ? d->egl.image != NULL : d->mark != 0;
+#else
+ ready = d->mark != 0;
#endif
- d->mark;
-
+ }
/* If the 'resize-guest' property is set, the application expects spice-gtk
* to manage the size and state of the displays, so update the 'enabled'
* state here. If 'resize-guest' is false, we can assume that the
More information about the Spice-commits
mailing list