aboutsummaryrefslogtreecommitdiffstats
path: root/src/gwin/gwm.c
diff options
context:
space:
mode:
authorinmarket <andrewh@inmarket.com.au>2013-07-06 01:42:10 +1000
committerinmarket <andrewh@inmarket.com.au>2013-07-06 01:42:10 +1000
commitf3f9b7dc015b5afc82fba6682e780dcc72f9241d (patch)
tree7644ded5c752f66064692dde8f82785c41ec22a1 /src/gwin/gwm.c
parent99c13615c829f5d64fe10f644aa493be0cd01c15 (diff)
downloaduGFX-f3f9b7dc015b5afc82fba6682e780dcc72f9241d.tar.gz
uGFX-f3f9b7dc015b5afc82fba6682e780dcc72f9241d.tar.bz2
uGFX-f3f9b7dc015b5afc82fba6682e780dcc72f9241d.zip
Fix window manager bug
Window are was not being cleared properly when something was made invisible
Diffstat (limited to 'src/gwin/gwm.c')
-rw-r--r--src/gwin/gwm.c18
1 files changed, 8 insertions, 10 deletions
diff --git a/src/gwin/gwm.c b/src/gwin/gwm.c
index 75b08be6..88d61a21 100644
--- a/src/gwin/gwm.c
+++ b/src/gwin/gwm.c
@@ -88,18 +88,16 @@ static void WM_Delete(GHandle gh) {
}
static void WM_Visible(GHandle gh) {
+ #if GDISP_NEED_CLIP
+ gdispSetClip(gh->x, gh->y, gh->width, gh->height);
+ #endif
if ((gh->flags & GWIN_FLG_VISIBLE)) {
- if (gh->vmt->Redraw) {
- #if GDISP_NEED_CLIP
- gdispSetClip(gh->x, gh->y, gh->width, gh->height);
- #endif
+ if (gh->vmt->Redraw)
gh->vmt->Redraw(gh);
- } else
- gwinClear(gh);
- // A real window manager would also redraw the borders
- }
-
- else
+ else
+ gdispFillArea(gh->x, gh->y, gh->width, gh->height, gh->bgcolor);
+ // A real window manager would also redraw the borders here
+ } else
gdispFillArea(gh->x, gh->y, gh->width, gh->height, gwinGetDefaultBgColor());
}