From 2ff6c3793c8b4036f8c2fe5e9479a7819e56e5be Mon Sep 17 00:00:00 2001 From: patacongo Date: Mon, 11 Jul 2011 13:30:47 +0000 Subject: [PATCH] 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 --- ChangeLog | 3 +++ TODO | 6 +----- graphics/nxbe/nxbe_closewindow.c | 9 ++++++++- 3 files changed, 12 insertions(+), 6 deletions(-) diff --git a/ChangeLog b/ChangeLog index a933a05030..fb04124e0d 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1892,3 +1892,6 @@ * graphics/nxbe/nxbe_move.c: Fixed an error in the graphics move logic (This was a previously untested interface). Basically, there is some confusion between use of (x,y) as a relative offset or as an absolute position. + * graphics/nxbe/nxbe_close.c: Fixed an important graphics system bug: + When a window is closed, the display was not being updated. The old + window graphic was left on the display for a time. diff --git a/TODO b/TODO index 0ac42b5f42..a2f1eb1f8a 100644 --- a/TODO +++ b/TODO @@ -14,7 +14,7 @@ nuttx/ (2) USB (drivers/usbdev, drivers/usbhost) (6) Libraries (lib/) (13) File system/Generic drivers (fs/, drivers/) - (2) Graphics subystem (graphics/) + (1) Graphics subystem (graphics/) (1) Pascal add-on (pcode/) (1) Documentation (Documentation/) (4) Build system / Toolchains @@ -484,10 +484,6 @@ o Graphics subystem (graphics/) Status: Open Priority: Medium - Description: When a window is closed, the display is not updated. - Status: Open - Priority: High - o Pascal Add-On (pcode/) ^^^^^^^^^^^^^^^^^^^^^^ diff --git a/graphics/nxbe/nxbe_closewindow.c b/graphics/nxbe/nxbe_closewindow.c index 7e7e3f45ef..ea87a97a4c 100644 --- a/graphics/nxbe/nxbe_closewindow.c +++ b/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); }