From 252b3b918a398c5225cc75cd1a67d9cf7dd3903b Mon Sep 17 00:00:00 2001 From: inmarket Date: Sat, 1 Apr 2017 13:21:38 +1000 Subject: [PATCH] Prevent GWIN drawing while deleting a window from the list --- src/gwin/gwin_wm.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/src/gwin/gwin_wm.c b/src/gwin/gwin_wm.c index c0ea8d25..0c4fd1bf 100644 --- a/src/gwin/gwin_wm.c +++ b/src/gwin/gwin_wm.c @@ -742,7 +742,9 @@ static bool_t WM_Add(GHandle gh, const GWindowInit *pInit) { static void WM_Delete(GHandle gh) { // Remove it from the window list + gfxSemWait(&gwinsem, TIME_INFINITE); gfxQueueASyncRemove(&_GWINList, &gh->wmq); + gfxSemSignal(&gwinsem); } static void WM_Redraw(GHandle gh) {