summaryrefslogtreecommitdiff
path: root/examples
diff options
context:
space:
mode:
authorNeil Roberts <neil@linux.intel.com>2013-03-22 13:23:42 +0000
committerNeil Roberts <neil@linux.intel.com>2013-03-22 15:51:58 +0000
commit003886661c833a7fd4954cf2630e72d47d5c8596 (patch)
tree66cf87f49fc3cf3b674a3190c2088bd2a69029d9 /examples
parent53a684bf9e875b071a6d990b2301fbaff599dd19 (diff)
downloadcogl-003886661c833a7fd4954cf2630e72d47d5c8596.tar.gz
cogland: Flush the clients in prepare, not check
The clients should be flushed before going idle, not after so the call to wl_display_flush_clients was in the wrong place. Reviewed-by: Robert Bragg <robert@linux.intel.com> (cherry picked from commit a191366fbababd5b551140ef9297a9c6e3852c59)
Diffstat (limited to 'examples')
-rw-r--r--examples/cogland.c6
1 files changed, 4 insertions, 2 deletions
diff --git a/examples/cogland.c b/examples/cogland.c
index fab76c6d..c18850a5 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;
}