summaryrefslogtreecommitdiff
path: root/nuttx/graphics/nxbe/nxbe_closewindow.c
diff options
context:
space:
mode:
authorpatacongo <patacongo@42af7a65-404d-4744-a932-0658087f49c3>2011-07-11 13:30:47 +0000
committerpatacongo <patacongo@42af7a65-404d-4744-a932-0658087f49c3>2011-07-11 13:30:47 +0000
commitbe05281b7a9a6d0757b8be67eeb5a5cf314968ae (patch)
tree933933cf3b5ba1ba86bc00b4f91a73d51c6e4344 /nuttx/graphics/nxbe/nxbe_closewindow.c
parentfcb3f0be7cf755c09970aef69d46c183779dc6f7 (diff)
downloadpx4-nuttx-be05281b7a9a6d0757b8be67eeb5a5cf314968ae.tar.gz
px4-nuttx-be05281b7a9a6d0757b8be67eeb5a5cf314968ae.tar.bz2
px4-nuttx-be05281b7a9a6d0757b8be67eeb5a5cf314968ae.zip
Correct an NX error that would leave stuff on the display when a window is closed
git-svn-id: svn://svn.code.sf.net/p/nuttx/code/trunk@3769 42af7a65-404d-4744-a932-0658087f49c3
Diffstat (limited to 'nuttx/graphics/nxbe/nxbe_closewindow.c')
-rw-r--r--nuttx/graphics/nxbe/nxbe_closewindow.c9
1 files changed, 8 insertions, 1 deletions
diff --git a/nuttx/graphics/nxbe/nxbe_closewindow.c b/nuttx/graphics/nxbe/nxbe_closewindow.c
index 7e7e3f45e..ea87a97a4 100644
--- a/nuttx/graphics/nxbe/nxbe_closewindow.c
+++ b/nuttx/graphics/nxbe/nxbe_closewindow.c
@@ -104,7 +104,7 @@ void nxbe_closewindow(struct nxbe_window_s *wnd)
if (wnd->above)
{
- /* Yes, now the window below that on is the window below
+ /* Yes, now the window below that one is the window below
* the one being closed.
*/
@@ -126,5 +126,12 @@ void nxbe_closewindow(struct nxbe_window_s *wnd)
*/
wnd->below->above = wnd->above;
+
+ /* Redraw the windows that were below us (and may now be exposed) */
+
+ nxbe_redrawbelow(be, wnd->below, &wnd->bounds);
+
+ /* Then discard the window structure */
+
free(wnd);
}