From 0e7b18832a6c694fd2443abeecf91fefc47ee76e Mon Sep 17 00:00:00 2001 From: Lionel Landwerlin Date: Tue, 15 Sep 2015 00:32:05 +0100 Subject: [PATCH] cogl: reset pending swaps counter on unrealize When removing the frame callback on the CoglOnscreen, we loose the ability to get notified of swap events. This could leave us with a counter != 0 which leads to a deadlock situation after the next realize/draw cycle. https://bugzilla.gnome.org/show_bug.cgi?id=755014 --- clutter/cogl/clutter-stage-cogl.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/clutter/cogl/clutter-stage-cogl.c b/clutter/cogl/clutter-stage-cogl.c index fd51e0765..a94e08243 100644 --- a/clutter/cogl/clutter-stage-cogl.c +++ b/clutter/cogl/clutter-stage-cogl.c @@ -77,6 +77,8 @@ clutter_stage_cogl_unrealize (ClutterStageWindow *stage_window) cogl_object_unref (stage_cogl->onscreen); stage_cogl->onscreen = NULL; } + + stage_cogl->pending_swaps = 0; } static void