diff --git a/graphics/nxbe/nxbe.h b/graphics/nxbe/nxbe.h index 29c0ac683f5..a7dc1e88e26 100644 --- a/graphics/nxbe/nxbe.h +++ b/graphics/nxbe/nxbe.h @@ -65,7 +65,7 @@ /* Server flags and helper macros: * - * NXBE_STATE_MODAL - One window is in a focused, modal state + * NXBE_STATE_MODAL - One window is in a focused, modal state */ #define NXBE_STATE_MODAL (1 << 0) /* Bit 0: One window is in a focused, diff --git a/graphics/nxbe/nxbe_setvisibility.c b/graphics/nxbe/nxbe_setvisibility.c index 055350b4a62..a0745ad0dae 100644 --- a/graphics/nxbe/nxbe_setvisibility.c +++ b/graphics/nxbe/nxbe_setvisibility.c @@ -68,6 +68,10 @@ void nxbe_show_window(FAR struct nxbe_window_s *wnd) { FAR struct nxbe_state_s *be = wnd->be; + /* Mark the window no longer hidden */ + + NXBE_CLRHIDDEN(wnd); + /* Restore the window to the top of the hierarchy. Exception: If the top * window is a modal window, then only raise it to second highest. */ @@ -82,6 +86,10 @@ void nxbe_show_window(FAR struct nxbe_window_s *wnd) wnd->below = be->topwnd->below; be->topwnd->below = wnd; + + /* Redraw this window and the other that are below us */ + + nxbe_redrawbelow(be, wnd, &wnd->bounds); } else { @@ -99,10 +107,6 @@ void nxbe_show_window(FAR struct nxbe_window_s *wnd) nxmu_redrawreq(wnd, &wnd->bounds); } - - /* Mark the window no longer hidden */ - - NXBE_CLRHIDDEN(wnd); } /****************************************************************************