From ee33f13f7e14e66e5ca2bff2676ab2876a2f69e5 Mon Sep 17 00:00:00 2001 From: inmarket Date: Sat, 1 Apr 2017 17:36:52 +1000 Subject: [PATCH] Another gwin concurrency fix --- src/gwin/gwin_wm.c | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/src/gwin/gwin_wm.c b/src/gwin/gwin_wm.c index 0c4fd1bf..7f251a70 100644 --- a/src/gwin/gwin_wm.c +++ b/src/gwin/gwin_wm.c @@ -986,6 +986,8 @@ static void WM_Raise(GHandle gh) { // Take it off the list and then put it back on top // The order of the list then reflects the z-order. + gfxSemWait(&gwinsem, TIME_INFINITE); + gfxQueueASyncRemove(&_GWINList, &gh->wmq); gfxQueueASyncPut(&_GWINList, &gh->wmq); @@ -1019,7 +1021,9 @@ static void WM_Raise(GHandle gh) { } } #endif - + + gfxSemSignal(&gwinsem); + // Redraw the window _gwinUpdate(gh); }