diff --git a/examples/cogland.c b/examples/cogland.c index fab76c6d6..c18850a52 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; }