libs/libnx/nxtk: Fix more cases where we were using the wrong coordinate system.
This commit is contained in:
parent
7b92f1417b
commit
683cd4c045
|
@ -89,7 +89,16 @@ int nxtk_closetoolbar(NXTKWINDOW hfwnd)
|
|||
|
||||
if (NXBE_ISRAMBACKED(&fwnd->wnd))
|
||||
{
|
||||
(void)nxtk_drawframe(fwnd, &fwnd->wnd.bounds); /* Does not fail */
|
||||
struct nxgl_rect_s relbounds;
|
||||
|
||||
/* Convert to a window-relative bounding box */
|
||||
|
||||
nxgl_rectoffset(&relbounds, &fwnd->wnd.bounds,
|
||||
-fwnd->wnd.bounds.pt1.x, -fwnd->wnd.bounds.pt1.y);
|
||||
|
||||
/* Then re-draw the frame */
|
||||
|
||||
(void)nxtk_drawframe(fwnd, &relbounds); /* Does not fail */
|
||||
}
|
||||
else
|
||||
#endif
|
||||
|
|
|
@ -103,7 +103,16 @@ int nxtk_opentoolbar(NXTKWINDOW hfwnd, nxgl_coord_t height,
|
|||
|
||||
if (NXBE_ISRAMBACKED(&fwnd->wnd))
|
||||
{
|
||||
(void)nxtk_drawframe(fwnd, &fwnd->wnd.bounds); /* Does not fail */
|
||||
struct nxgl_rect_s relbounds;
|
||||
|
||||
/* Convert to a window-relative bounding box */
|
||||
|
||||
nxgl_rectoffset(&relbounds, &fwnd->wnd.bounds,
|
||||
-fwnd->wnd.bounds.pt1.x, -fwnd->wnd.bounds.pt1.y);
|
||||
|
||||
/* Then re-draw the frame */
|
||||
|
||||
(void)nxtk_drawframe(fwnd, &relbounds); /* Does not fail */
|
||||
}
|
||||
else
|
||||
#endif
|
||||
|
|
|
@ -103,7 +103,16 @@ int nxtk_setsize(NXTKWINDOW hfwnd, FAR const struct nxgl_size_s *size)
|
|||
|
||||
if (ret >= 0 && NXBE_ISRAMBACKED(&fwnd->wnd))
|
||||
{
|
||||
ret = nxtk_drawframe(fwnd, &fwnd->wnd.bounds);
|
||||
struct nxgl_rect_s relbounds;
|
||||
|
||||
/* Convert to a window-relative bounding box */
|
||||
|
||||
nxgl_rectoffset(&relbounds, &fwnd->wnd.bounds,
|
||||
-fwnd->wnd.bounds.pt1.x, -fwnd->wnd.bounds.pt1.y);
|
||||
|
||||
/* Then re-draw the frame */
|
||||
|
||||
(void)nxtk_drawframe(fwnd, &relbounds); /* Does not fail */
|
||||
}
|
||||
#endif
|
||||
|
||||
|
|
Loading…
Reference in New Issue