aboutsummaryrefslogtreecommitdiffstats
path: root/src/gwin
diff options
context:
space:
mode:
authorinmarket <inmarket@ugfx.org>2017-04-01 13:21:38 +1000
committerinmarket <inmarket@ugfx.org>2017-04-01 13:21:38 +1000
commit252b3b918a398c5225cc75cd1a67d9cf7dd3903b (patch)
tree9c049bc448b9d032b55b39a27e284f410cdfca3f /src/gwin
parentd8c9ca184f29800f6c23d02bc450ea0e67981990 (diff)
downloaduGFX-252b3b918a398c5225cc75cd1a67d9cf7dd3903b.tar.gz
uGFX-252b3b918a398c5225cc75cd1a67d9cf7dd3903b.tar.bz2
uGFX-252b3b918a398c5225cc75cd1a67d9cf7dd3903b.zip
Prevent GWIN drawing while deleting a window from the list
Diffstat (limited to 'src/gwin')
-rw-r--r--src/gwin/gwin_wm.c2
1 files changed, 2 insertions, 0 deletions
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) {