[Cogl] [PATCH 3/3] cogland: Flush the clients in prepare, not check
Neil Roberts
neil at linux.intel.com
Fri Mar 22 07:47:49 PDT 2013
The clients should be flushed before going idle, not after so the call
to wl_display_flush_clients was in the wrong place.
---
examples/cogland.c | 6 ++++--
1 file changed, 4 insertions(+), 2 deletions(-)
diff --git a/examples/cogland.c b/examples/cogland.c
index 45de95a..d09c319 100644
--- a/examples/cogland.c
+++ b/examples/cogland.c
@@ -213,8 +213,12 @@ region_subtract (CoglandRegion *region,
static CoglBool
wayland_event_source_prepare (GSource *base, int *timeout)
{
+ WaylandEventSource *source = (WaylandEventSource *)base;
+
*timeout = -1;
+ wl_display_flush_clients (source->display);
+
return FALSE;
}
@@ -223,8 +227,6 @@ wayland_event_source_check (GSource *base)
{
WaylandEventSource *source = (WaylandEventSource *)base;
- wl_display_flush_clients (source->display);
-
return source->pfd.revents;
}
--
1.7.11.3.g3c3efa5
More information about the Cogl
mailing list