aboutsummaryrefslogtreecommitdiff
path: root/nuttx/graphics/nxtk/nxtk_getwindow.c
diff options
context:
space:
mode:
authorpx4dev <px4@purgatory.org>2013-01-14 21:01:58 -0800
committerpx4dev <px4@purgatory.org>2013-01-14 21:01:58 -0800
commit854c6436b4e3b292fd04843795d0369dc8856783 (patch)
tree4d5602f5c70926d2dcd01294561ddd8df4378462 /nuttx/graphics/nxtk/nxtk_getwindow.c
parent6d138a845aabad31060bd00da0d20d177d3f4be4 (diff)
parentc38ad4ded570eddadeeca3579d02dfc63dcc8a9d (diff)
downloadpx4-firmware-854c6436b4e3b292fd04843795d0369dc8856783.tar.gz
px4-firmware-854c6436b4e3b292fd04843795d0369dc8856783.tar.bz2
px4-firmware-854c6436b4e3b292fd04843795d0369dc8856783.zip
Pull NuttX up to the 6.24 release.
Merge branch 'nuttx-merge-5447'
Diffstat (limited to 'nuttx/graphics/nxtk/nxtk_getwindow.c')
-rw-r--r--nuttx/graphics/nxtk/nxtk_getwindow.c11
1 files changed, 7 insertions, 4 deletions
diff --git a/nuttx/graphics/nxtk/nxtk_getwindow.c b/nuttx/graphics/nxtk/nxtk_getwindow.c
index 121c7702a..c91f2d22f 100644
--- a/nuttx/graphics/nxtk/nxtk_getwindow.c
+++ b/nuttx/graphics/nxtk/nxtk_getwindow.c
@@ -110,12 +110,15 @@ int nxtk_getwindow(NXTKWINDOW hfwnd, FAR const struct nxgl_rect_s *rect,
}
#endif
- /* Clip the rectangle so that it lies within the sub-window bounds
- * then move the rectangle to that it is relative to the containing
- * window.
+ /* Move the rectangle to that it is relative to the containing
+ * window. If part of the rectangle lies outside the window,
+ * it will contain garbage data, but the contained area will be
+ * valid.
*/
- nxtk_subwindowclip(fwnd, &getrect, rect, &fwnd->fwrect);
+ nxgl_rectoffset(&getrect, rect,
+ fwnd->fwrect.pt1.x - fwnd->wnd.bounds.pt1.x,
+ fwnd->fwrect.pt1.y - fwnd->wnd.bounds.pt1.y);
/* Then get it */