aboutsummaryrefslogtreecommitdiffstats
path: root/src/gwin/gwin.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/gwin/gwin.c')
-rw-r--r--src/gwin/gwin.c18
1 files changed, 18 insertions, 0 deletions
diff --git a/src/gwin/gwin.c b/src/gwin/gwin.c
index f080ac64..de1673cb 100644
--- a/src/gwin/gwin.c
+++ b/src/gwin/gwin.c
@@ -63,6 +63,16 @@ static color_t defaultBgColor = Black;
if (gh->height < MIN_WIN_HEIGHT) { gh->height = MIN_WIN_HEIGHT; }
if (gh->x+gh->width > gdispGetWidth()) gh->width = gdispGetWidth() - gh->x;
if (gh->y+gh->height > gdispGetHeight()) gh->height = gdispGetHeight() - gh->y;
+
+ // Redraw the window
+ if ((gh->flags & GWIN_FLG_VISIBLE)) {
+ if (gh->vmt->Redraw) {
+ #if GDISP_NEED_CLIP
+ gdispSetClip(gh->x, gh->y, gh->width, gh->height);
+ #endif
+ gh->vmt->Redraw(gh);
+ }
+ }
}
#endif
@@ -135,10 +145,18 @@ void gwinSetDefaultColor(color_t clr) {
defaultFgColor = clr;
}
+color_t gwinGetDefaultColor(void) {
+ return defaultFgColor;
+}
+
void gwinSetDefaultBgColor(color_t bgclr) {
defaultBgColor = bgclr;
}
+color_t gwinGetDefaultBgColor(void) {
+ return defaultBgColor;
+}
+
#if GDISP_NEED_TEXT
void gwinSetDefaultFont(font_t font) {
defaultFont = font;