Skip to content
Snippets Groups Projects
Commit 38c27062 authored by patacongo's avatar patacongo
Browse files

Fix raise logic -- what was I thinking?

git-svn-id: svn://svn.code.sf.net/p/nuttx/code/trunk@1375 42af7a65-404d-4744-a932-0658087f49c3
parent c16178c2
No related branches found
No related tags found
No related merge requests found
...@@ -71,18 +71,6 @@ struct nxbe_raise_s ...@@ -71,18 +71,6 @@ struct nxbe_raise_s
* Private Functions * 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 * Public Functions
****************************************************************************/ ****************************************************************************/
...@@ -98,36 +86,14 @@ static void nxbe_clipraise(FAR struct nxbe_clipops_s *cops, ...@@ -98,36 +86,14 @@ static void nxbe_clipraise(FAR struct nxbe_clipops_s *cops,
void nxbe_raise(FAR struct nxbe_window_s *wnd) void nxbe_raise(FAR struct nxbe_window_s *wnd)
{ {
FAR struct nxbe_state_s *be = wnd->be; 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) if (!wnd->above)
{ {
return; 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 /* Remove window from the list. Note that there is always
* some below this window (it may only be the background window) * some below this window (it may only be the background window)
*/ */
...@@ -142,4 +108,10 @@ void nxbe_raise(FAR struct nxbe_window_s *wnd) ...@@ -142,4 +108,10 @@ void nxbe_raise(FAR struct nxbe_window_s *wnd)
be->topwnd->above = wnd; be->topwnd->above = wnd;
be->topwnd = 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);
} }
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment