9
0
Fork 0

Fix raise logic -- what was I thinking?

git-svn-id: https://nuttx.svn.sourceforge.net/svnroot/nuttx/trunk@1375 7fd9a85b-ad96-42d3-883c-3090e2eb8679
This commit is contained in:
patacongo 2008-12-01 16:34:05 +00:00
parent 8ecf6c58ab
commit 86b5e5e54b
1 changed files with 8 additions and 36 deletions

View File

@ -71,18 +71,6 @@ struct nxbe_raise_s
* Private Functions
****************************************************************************/
/****************************************************************************
* Name: nxbe_clipraise
****************************************************************************/
static void nxbe_clipraise(FAR struct nxbe_clipops_s *cops,
FAR struct nxbe_plane_s *plane,
FAR const struct nxgl_rect_s *rect)
{
FAR struct nxbe_window_s *wnd = ((struct nxbe_raise_s *)cops)->wnd;
nxfe_redrawreq(wnd, rect);
}
/****************************************************************************
* Public Functions
****************************************************************************/
@ -98,36 +86,14 @@ static void nxbe_clipraise(FAR struct nxbe_clipops_s *cops,
void nxbe_raise(FAR struct nxbe_window_s *wnd)
{
FAR struct nxbe_state_s *be = wnd->be;
struct nxgl_rect_s rect;
struct nxbe_raise_s info;
/* If this window is already at the top of the display, then do nothing */
if (!wnd->above)
{
return;
}
/* Redraw the bits that are currently obscured */
nxgl_rectintersect(&rect, &wnd->bounds, &be->bkgd.bounds);
if (!nxgl_nullrect(&rect))
{
int i;
info.cops.visible = nxbe_clipnull;
info.cops.obscured = nxbe_clipraise;
info.wnd = wnd;
#if CONFIG_NX_NPLANES > 1
for (i = 0; i < be->vinfo.nplanes; i++)
#else
i = 0;
#endif
{
nxbe_clipper(wnd->above, &rect, NX_CLIPORDER_DEFAULT,
&info.cops, &be->plane[i]);
}
}
/* Remove window from the list. Note that there is always
* some below this window (it may only be the background window)
*/
@ -142,4 +108,10 @@ void nxbe_raise(FAR struct nxbe_window_s *wnd)
be->topwnd->above = wnd;
be->topwnd = wnd;
/* This window is now at the top of the display, we know, therefore, that
* it is not obscured by another window
*/
nxfe_redrawreq(wnd, &wnd->bounds);
}