summaryrefslogtreecommitdiff
path: root/apps/examples/nxconsole/nxcon_wndo.c
diff options
context:
space:
mode:
Diffstat (limited to 'apps/examples/nxconsole/nxcon_wndo.c')
-rw-r--r--apps/examples/nxconsole/nxcon_wndo.c9
1 files changed, 9 insertions, 0 deletions
diff --git a/apps/examples/nxconsole/nxcon_wndo.c b/apps/examples/nxconsole/nxcon_wndo.c
index 6fadda866..083da739d 100644
--- a/apps/examples/nxconsole/nxcon_wndo.c
+++ b/apps/examples/nxconsole/nxcon_wndo.c
@@ -115,6 +115,8 @@ const struct nx_callback_s g_nxconcb =
static void nxwndo_redraw(NXWINDOW hwnd, FAR const struct nxgl_rect_s *rect,
bool more, FAR void *arg)
{
+ nxgl_mxpixel_t wcolor[CONFIG_NX_NPLANES];
+
gvdbg("hwnd=%p rect={(%d,%d),(%d,%d)} more=%s\n",
hwnd, rect->pt1.x, rect->pt1.y, rect->pt2.x, rect->pt2.y,
more ? "true" : "false");
@@ -127,6 +129,13 @@ static void nxwndo_redraw(NXWINDOW hwnd, FAR const struct nxgl_rect_s *rect,
nxcon_redraw(g_nxcon_vars.hdrvr, rect, more);
}
+ else
+ {
+ /* If the driver has not been opened, then just redraw the window color */
+
+ wcolor[0] = CONFIG_EXAMPLES_NXCON_WCOLOR;
+ (void)nxtk_fillwindow(hwnd, rect, wcolor);
+ }
}
/****************************************************************************