From bbc4222eaf1cc787f1c9a29970e618eda32348e0 Mon Sep 17 00:00:00 2001 From: Dongyeon Kim Date: Fri, 10 Apr 2015 16:13:04 +0900 Subject: [PATCH] Evas GL: reset current surface to NULL when it is destroyed Summary: Hopefully this will fix some of the multiple windows issues for elm glview but not all. @fix Test Plan: elementary glview tests Reviewers: cedric, jpeg Reviewed By: jpeg Subscribers: cedric Differential Revision: https://phab.enlightenment.org/D2317 --- src/modules/evas/engines/gl_common/evas_gl_core.c | 3 +++ 1 file changed, 3 insertions(+) diff --git a/src/modules/evas/engines/gl_common/evas_gl_core.c b/src/modules/evas/engines/gl_common/evas_gl_core.c index 12542247bf..85a1ddce7f 100644 --- a/src/modules/evas/engines/gl_common/evas_gl_core.c +++ b/src/modules/evas/engines/gl_common/evas_gl_core.c @@ -1961,6 +1961,9 @@ evgl_surface_destroy(void *eng_data, EVGL_Surface *sfc) if ((dbg = evgl_engine->api_debug_mode)) DBG("Destroying surface sfc %p (eng %p)", sfc, eng_data); + if (sfc->current_ctx && sfc->current_ctx->current_sfc == sfc) + sfc->current_ctx->current_sfc = NULL; + if ((rsc->current_ctx) && (rsc->current_ctx->current_sfc == sfc) ) { if (evgl_engine->api_debug_mode)