diff --git a/graphics/nxbe/nxbe_lower.c b/graphics/nxbe/nxbe_lower.c index 06a3e3b583..8e93ab0061 100644 --- a/graphics/nxbe/nxbe_lower.c +++ b/graphics/nxbe/nxbe_lower.c @@ -98,7 +98,9 @@ void nxbe_lower(FAR struct nxbe_window_s *wnd) below = wnd->below; - /* Then put the lowered window at the bottom (just above the background window) */ + /* Then put the lowered window at the bottom (just above the background + * window). + */ wnd->below = &be->bkgd; wnd->above = be->bkgd.above; diff --git a/graphics/nxbe/nxbe_raise.c b/graphics/nxbe/nxbe_raise.c index 09becc840b..25e4e3a93d 100644 --- a/graphics/nxbe/nxbe_raise.c +++ b/graphics/nxbe/nxbe_raise.c @@ -110,17 +110,24 @@ void nxbe_raise(FAR struct nxbe_window_s *wnd) if (NXBE_STATE_ISMODAL(be) && be->topwnd->below != NULL) { + FAR struct nxbe_window_s *above; + FAR struct nxbe_window_s *below; + /* We are in a modal state. The topwnd is not the background and it * has focus. */ - wnd->above = be->topwnd; - wnd->below = be->topwnd->below; + above = be->topwnd; + below = be->topwnd->below; - be->topwnd->below = wnd; + wnd->above = above; + wnd->below = below; + + above->below = wnd; + below->above = wnd; /* Then redraw this window AND all windows below it. Having moved the - * window, we may have exposed previoulsy obscured portions of windows + * window, we may have exposed previously obscured portions of windows * below this one. */ diff --git a/graphics/nxbe/nxbe_setposition.c b/graphics/nxbe/nxbe_setposition.c index c4a4239dbc..7db92e9296 100644 --- a/graphics/nxbe/nxbe_setposition.c +++ b/graphics/nxbe/nxbe_setposition.c @@ -88,7 +88,7 @@ void nxbe_setposition(FAR struct nxbe_window_s *wnd, nxmu_reportposition(wnd); /* Then redraw this window AND all windows below it. Having moved the - * window, we may have exposed previoulsy obscured portions of windows + * window, we may have exposed previously obscured portions of windows * below this one. */