diff options
author | patacongo <patacongo@42af7a65-404d-4744-a932-0658087f49c3> | 2012-03-29 22:20:47 +0000 |
---|---|---|
committer | patacongo <patacongo@42af7a65-404d-4744-a932-0658087f49c3> | 2012-03-29 22:20:47 +0000 |
commit | 67ea31797d0a81295664484a61aebd54607f3c86 (patch) | |
tree | ffdeb3afd707f0c9bd41edbf3a2e48756fbc8065 /apps/examples/nxconsole/nxcon_wndo.c | |
parent | 3e62f2be816d0a212b52fd609121004b16d80a8a (diff) | |
download | nuttx-67ea31797d0a81295664484a61aebd54607f3c86.tar.gz nuttx-67ea31797d0a81295664484a61aebd54607f3c86.tar.bz2 nuttx-67ea31797d0a81295664484a61aebd54607f3c86.zip |
Can now run an NSH session within an NX window
git-svn-id: svn://svn.code.sf.net/p/nuttx/code/trunk@4539 42af7a65-404d-4744-a932-0658087f49c3
Diffstat (limited to 'apps/examples/nxconsole/nxcon_wndo.c')
-rw-r--r-- | apps/examples/nxconsole/nxcon_wndo.c | 9 |
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); + } } /**************************************************************************** |