mirror of
https://github.com/apache/nuttx.git
synced 2026-06-05 07:12:54 +08:00
graphics/: Windows can now be created in the hidden state. This can be used to clean up initial window presentation which may involve several steps. This makes those steps all invisible until nx[tk]_setvisibility() is called to make the windows visible.
This commit is contained in:
@@ -160,32 +160,37 @@ void nxmu_openwindow(FAR struct nxbe_state_s *be, FAR struct nxbe_window_s *wnd)
|
||||
}
|
||||
#endif
|
||||
|
||||
/* Now, insert the new window at the correct position in the hierarchy.
|
||||
* topwnd is never NULL (it may point only at the background window,
|
||||
* however). If we are in a modal state, then we cannot insert the
|
||||
* window at the top of the display.
|
||||
*/
|
||||
/* Is the window being created in the hidden state? */
|
||||
|
||||
if (NXBE_STATE_ISMODAL(be) && be->topwnd->below != NULL)
|
||||
if (!NXBE_ISHIDDEN(wnd))
|
||||
{
|
||||
/* We are in a modal state. The topwnd is not the background and it
|
||||
* has focus.
|
||||
/* No.. Insert the new window at the correct position in the
|
||||
* hierarchy. topwnd is never NULL (it may point only at the
|
||||
* background window, however). If we are in a modal state, then we
|
||||
* cannot insert the window at the top of the display.
|
||||
*/
|
||||
|
||||
wnd->above = be->topwnd;
|
||||
wnd->below = be->topwnd->below;
|
||||
if (NXBE_STATE_ISMODAL(be) && be->topwnd->below != NULL)
|
||||
{
|
||||
/* We are in a modal state. The topwnd is not the background and
|
||||
* it has focus.
|
||||
*/
|
||||
|
||||
be->topwnd->below = wnd;
|
||||
}
|
||||
else
|
||||
{
|
||||
/* Otherwise insert the new window at the top on the display. */
|
||||
wnd->above = be->topwnd;
|
||||
wnd->below = be->topwnd->below;
|
||||
|
||||
wnd->above = NULL;
|
||||
wnd->below = be->topwnd;
|
||||
be->topwnd->below = wnd;
|
||||
}
|
||||
else
|
||||
{
|
||||
/* Otherwise insert the new window at the top on the display. */
|
||||
|
||||
be->topwnd->above = wnd;
|
||||
be->topwnd = wnd;
|
||||
wnd->above = NULL;
|
||||
wnd->below = be->topwnd;
|
||||
|
||||
be->topwnd->above = wnd;
|
||||
be->topwnd = wnd;
|
||||
}
|
||||
}
|
||||
|
||||
/* Report the initial size/position of the window to the client */
|
||||
|
||||
Reference in New Issue
Block a user